Addressing 1 pushpin

bvv
09-11-2003, 07:33 AM
I'm working on an application which uses Access and Mappoint to plan transport. On the left screen I have an access form with all destinations (up to 200). On the right screen I have a mappoint map which shows all destinations. So far, so good.
Now I want to highlight the destination choosen on the left screen. Do I really have to run to the entire recordset of the dataset or can I address the pushpin directly. All pushpins have a name depending on certain values in my access database.

Fer
09-11-2003, 08:05 PM
200 pushpins don't sound like too much burden to have their references in memory. What I would recommend you to do is have some sort of a hashtable, that you can refer to it by a unique id and get the reference of the corresponding pushpin. This way you will always have in hand the pushpin that you are referencing on the left side, and it'll be much faster than querying MP's recordsets.

I think maybe a collection can be referenced by a specific key, I haven't done much VB programming in a while.

HTH


Fernando


P.S. You will need a way to gather the references first, and this may or may not be as slow as querying the recordsets, depending on the methods you choose.

 
Web mp2kmag.com
mapforums.com