Mar 11

Written by: Soul Solutions
Sunday, 11 March 2007 

johnWeeGo.jpgIts been a long time comming but i published today my 2nd revision of the very popular article on clustering virtual earth pins. This revision utilises MS AJAX web services and the server side code is in C#. Full example source code is downloadable from this site.

Read the article here.

Have any questions or comments?

Tags:

10 comment(s) so far...

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

Hi,

I'm using the Virtual Earth in my application and I saw your Clustering code and it is simply fantastic. I try use your code, but don't works in Virtual Earth 5.0.

I saw that Microsoft published the Virtual Earth 5.0, but I don't know about difference between both versions.

You it could adapt your Clustering code for for Virtual Earth 5.0?
I appreciate.

thanks
PS.: Sorry my English.

By Bruno Marçal on   Thursday, 3 May 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

Yes there are a few changes, V5 just got released and I'm away in Thailand. I'm back in a few weeks and will update it to reflect the changes - you can subscribe to this site on the contact us page to keep updated.

By john (soul solutions) on   Friday, 4 May 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

Hi again,

I use the clustering (version C#) and I have a problem. I need to show different images (Authors and Books for example) for cluster points and nocluster points.

I tried to add the image name to the XML this which is ok, but then I get a mess when encoding/decoding. What would be your concept to pass the pushpin type?

thanks a lot

By Bruno Marçal on   Wednesday, 13 June 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

I try to keep the cluster example as simple as possible. I use a bitmask to encode the pin types - eg 1 maybe McDonalds, 2 KFC, 4 Pizza hut, 8 Burger King - using a bitmask means you can get something like 7 then means the clust is 1+2+4=7, MD,KFC and PH. I pass these through a bit like the bounds in the csv file, one per clustered pin and store them in the clustered pin js object in the same way as the bounds. When I draw the pin i then select the appropriate icon based on this value.
Hope that helps!

By John (soulsolutions) on   Wednesday, 13 June 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

Ok John,

I try this and post here the results.

Thanks for help.

By Bruno Marçal on   Thursday, 14 June 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

Me again.

I'm trying your solution, but I have a problem with bounds.
What is bounds class means?

thanks again.

By Bruno Marçal on   Friday, 15 June 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

Success...

I did it, works perfectly. You save my life - hehehe
I will publish the system after populate the database and post the URL here.

Thanks again, your help was very important.

By Bruno Marçal on   Saturday, 16 June 2007

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

In your "addPinsWithinRange" method you compare the x and y coordinates of points to "clusterwidth" and "clusterheight", but these variables don't depend on the zoom level. I think they should because at low level zoom too many pins are displayed, and at higher level zooms not enough. What do you think?

By jc on   Tuesday, 2 December 2008

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

forget my previous message, I had an error in my code (I was always passing 10 for zoomlevel...)
now it works great!

By jc on   Tuesday, 2 December 2008

Re: New Virtual Earth Article - Clustering with MS AJAX and C#

I'm trying to get my head around how/why your sorting of the pins prior to clustering works from an algorithmic perspective.

Imagine 3 pins, A,B,C where A is immediately to the left of B but C is on the same x co-ordinate as A but has a much greater y (and specifically outside the cluster radius). The pinpixelcompare comparator will result in a sort order of ACB and so when we are searching for pins within range, we will look at point C, realise it is outside the radius and stop looking for pins to add to the cluster. Effectively pin C is blocking A from discovering pin B which is right beside it.

If my understanding is correct, I'm wondering what the real world consequences are. It seems to force A and B to be in different clusters when they should be together?

Am I barking up the wrong tree?


By Roger on   Wednesday, 31 March 2010

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
Copyright © 2002-2013 Soul Solutions Pty Ltd. | Login