Access attributes of clustered symbols?

347
3
06-10-2010 12:21 PM
BenjaminGeiger
New Contributor
I'm using some code to replicate the hyperlink functionality of ArcGIS Desktop. For this to work, each graphic has to have a 'URL' attribute.

All of my feature layers have this attribute. Single features contain a URL attribute that can be accessed from the Click event. However, the clustered ones don't.

How do I copy this attribute over, or how do I access the original feature from the clustered one?
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
You should be able to do that by implementing a custom cluster (see sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomClusterer).

When you create a cluster graphic in 'OnCreateGraphic', you can add an attribute 'URL' and initialize it with a value coming from one of the initial graphics.
Then you can add the needed mouse handler (probably MouseLeftButtonDown) to access to the URL.
0 Kudos
BenjaminGeiger
New Contributor
Is there any way to inherit from FlareClusterer and still add this behavior, or do I need to reimplement it? (If I have to reimplement it, is the source available anywhere?)
0 Kudos
BenjaminGeiger
New Contributor
Also, the MapTip also seems to be copied over successfully from the component graphics into the cluster graphic. Is there any way to have the URL differ on each flare?

I'd actually like for the graphics to be able to shove each other out of the way if necessary, so they don't overlap. Can this be done?
0 Kudos