how to display overlap pins in one pin with number?

Answered how to display overlap pins in one pin with number?

  • Monday, February 06, 2012 7:11 PM
     
     

    Here is an sample from google map. Is it easy to do it with Bing map?

    You can see the blue pin with number 4 which means that there are 4 pins there overlapping. If zoom in, the 4 pins will be displayed individually.

     

All Replies

  • Tuesday, February 07, 2012 8:00 AM
    Moderator
     
     Answered

    Yes - it's called pushpin clustering:

    http://bingmapsv7modules.codeplex.com/wikipage?title=Client%20Side%20Clustering


    twitter: @alastaira blog: http://alastaira.wordpress.com/

  • Tuesday, February 07, 2012 11:28 PM
     
     

    Thanks Man!

    But I got some javascript error with the example downloaded from that link.

    The error is "myLayer is undefined" on line 73.

    I got this error in both IE and Firefox. Could you please have a try?

    Thanks!!!

  • Wednesday, February 08, 2012 11:20 PM
    Owner
     
     Answered
    There is a spelling error in the minified file. Replace the dash in the minidified file name with a period. Also, you may be interested in this other clustering method: http://bingmapsv7modules.codeplex.com/wikipage?title=Point%20Based%20Clustering

    http://rbrundritt.wordpress.com

  • Thursday, February 09, 2012 6:13 PM
     
     
    Any difference betwwen these two clustering method?
  • Friday, February 10, 2012 11:54 AM
    Owner
     
     Answered
    Yes, There is a difference. The USer experience is better with the point base clustering but the performance is not as good as the grid based method. That said it can handle 2000 pushpins without any issues. I documented all this in the following article: http://rbrundritt.wordpress.com/2012/01/04/client-side-point-based-clustering/

    http://rbrundritt.wordpress.com

  • Thursday, September 27, 2012 4:21 PM
     
     

    Richard,

    I want to thank you for the PointBasedClustering code.  It is great.

    I am having only one issue and I can't figure out where to check the _zoomLevel so it won't cluster any more points.  I have some points on the map (vehicles) that are very close together.  When you zoom in at max zoom which is in this case 20 there is still a cluster image.  I would like to modify your code to not cluster points if _zoomLevel is > 15.  Is this possible?

    I would appreciate your help.

    Thank you,

    Michael 

  • Friday, September 28, 2012 9:21 AM
    Owner
     
     Answered

    This is actually pretty involved. I've gone through and updated the code base to support this. Download the latest version here: http://bingmapsv7modules.codeplex.com/wikipage?title=Point%20Based%20Clustering There is a property at the top to the file called _maxclusterZoom. Set this value to what you prefer. This will disable clustering below that zoom level.


    http://rbrundritt.wordpress.com