Select to view content in your preferred language

MapTip on FlareClusterer

705
3
04-20-2010 03:52 PM
DevalChauhan
Emerging Contributor
I can easily provide MapTip on FlareSymbol using GraphicsLayer.MapTip property but was wondering if there is any way to provide MapTip on Aggregated Symbol ? Infact maptip on custom GraphicsClusterer doesnt work either
0 Kudos
3 Replies
DevalChauhan
Emerging Contributor
I figured out MapTip on custom clusterer, but couldnt get to work maptip on aggregated symbol using FlareClusterer.

Any help will be appreciated
0 Kudos
GaryBushek
Deactivated User
I can easily provide MapTip on FlareSymbol using GraphicsLayer.MapTip property but was wondering if there is any way to provide MapTip on Aggregated Symbol ? Infact maptip on custom GraphicsClusterer doesnt work either



How did you assign an attribute to the flareclusterer graphic's maptip? Can't seem to figure this out.
0 Kudos
JoshPorter
Occasional Contributor
How did you assign an attribute to the flareclusterer graphic's maptip?


Inherit flarecluster and add your code in the OnCreateGraphic, but be sure to call the Overridden function of the base flareclusterer class so it still works. Something like this in VB

Protected Overrides Function OnCreateGraphic(ByVal cluster As GraphicCollection, ByVal point As MapPoint, ByVal maxClusterCount As Integer) As Graphic
        Dim graphic As Graphic= MyBase.OnCreateGraphic(cluster, point, maxClusterCount)

        If (cluster.Count <> 1) Then
            If (cluster.Count <= Me.MaximumFlareCount) Then
                'We only want to add this attribute to the "small" clusters, the ones that flare out when you mouseover
                For Each g As Graphic In cluster
                    g.Attributes("CustomAttribute") =  attributeValue
                Next
            End If
            Return graphic
        Else
            'these would be unclustered graphics, but my breakpoint here has never been hit...
        End If
        Return graphic
    End Function


good luck!!

Josh
0 Kudos