Max Number of VEPushPins

Mar 20, 2009 at 6:40 PM
Hi,

Great work on this. It is looking great.

I am working on a proof of concept on surface where I would like to display all of a companies locations as pushpins on the Globe. I have about 150 locations I create the pins in the loaded event, set their lat/long values then set the itemsource of the map to my List<VEPushPin>. This does the trick and they appear on the map as expected. However the performance at this point is really slow, to the point of being unusable.

Do you have a recommended maximum amount of VEPins? Do you have recommendations on how to acheive something like my scenario?

Cheers,
Liam
Coordinator
Mar 21, 2009 at 11:33 AM
Hi Liam,

There is a practical limit on the pushpins, but I don't quite know where it is yet.  We have done 50 pushpins without much problem, but above that you'll probably want to do clustering.

Look at the other thread where I just posted ideas about how to achieve clustering.  Maybe you could cluster based upon continent or country.

Josh
Mar 23, 2009 at 3:35 PM
Hey Josh,

Thanks for the quick reply. I have been playing around with the clustering suggestion but unless I am doing something wrong it seems as if I still have the same issue. Lets say for example I have 7 continents set as parent push pins with a min zoom of 20,000 feet. I then create a push pin for each of the 150 locations, assign them their appropriate parent pin and set their max height to 20,000 feet. When I am above 20,000 feet all is cool. I can see the 7 continents but as soon as I go below 20,000 all 150 locations will load up and the continents will go away so I am back to square 1, even though I zoomed into europe and would expect only the european ones to load. It seems like what I need is some way of hiding push pins that are not visible on the screen.

Would all 150 pins load in this scenario or would only the ones in view load?

Cheers,
Liam
Coordinator
Mar 23, 2009 at 4:06 PM
Yes that's true, all 150 would become "available" once you go below 20000 feet, but pushpins that are not visible in the current map view are hidden/collapsed anyway so it shouldn't be a big problem.  Since you are zoomed in you should only see the pushpins for a small area of the map, which hopefully will limit them. 

Did you try this and still have performance issues, or are you asking my opinion of whether it will work?

If you need further control over clustering, etc., you can subclass VEPushPin and write some of your own logic.  Venture into the VEPushPin.cs source to see how I made it work.
Mar 23, 2009 at 10:51 PM
Thanks Josh,

You have given me enough information here for me to proceed.

Cheers,
Liam