View Full Version : Pushpin set question

11-18-2005, 04:07 AM
Hi, i just started developing to Mappoint in VB6, and i have a question about pushpins.

How can i create and then add a pushpin to a dataset and then display the dataset in the map?
I think that might be the best thing to do if you want to add a bunch of pushpins at the same time (and the fastest way too).

Thanks in advance.

11-18-2005, 09:27 AM

Location loc = mp.ActiveMap.GetLocation(lat, lon, alt);
Pushpin pp = mp.ActiveMap.AddPushpin(loc, "Name");
pp.Symbol = 1;
pp.Note = "test\r\n" + "and next line";
pp.BalloonState = GeoBalloonState.geoDisplayBalloon;
pp.Highlight = true;
mp.ActiveMap.GoToLatLong(lat, lon, alt);

Does this answer your question?

11-21-2005, 04:01 AM
Hi Wilfried,

No, it doesn't, I know how to create a pushpin, but i don't know how to create a set of them, i want to create a set because inserting pushpin by pushpin is very slow because MapPoint always refresh all the map and i thought that if I create a set of pushpin and add the set it could be faster.

Thanks :)

11-21-2005, 12:34 PM

Now I understeand more of what you wants. No the AddPushPin is the only method you can use. Even if you use another dataset for the pushpins you have to add them 1 by 1.