Custom cluster graphic does not fire mouse handler

1980
1
01-29-2014 01:10 PM
Labels (1)
VernonChin
New Contributor II
Hello,

I have created a custom graphics cluster in code-behind with the following XAML:
<esri:GraphicsLayer ID="WorkOrders" MouseLeftButtonUp="GraphicsLayer_MouseLeftButtonUp">
    <esri:GraphicsLayer.Clusterer>
        <s:OrderClusterer>
        </s:OrderClusterer>
    </esri:GraphicsLayer.Clusterer>
</esri:GraphicsLayer>


The mouse up handler normally fires when I click on an unclustered graphic; I am wondering why the cluster graphic (if it belongs to the same graphics layer) does not fire the handler.

Do I need to work around this with a generic map mouseclick handler [as I am currently doing in my generic map touch handler] via FindGraphicsInHostCoordinates() ?

Thanks,
Vernon
0 Kudos
1 Reply
VernonChin
New Contributor II
FWIW, I have also found a slight conflict in the API docs regarding hit-testing (specifically for the cluster graphic).  In the FlareClusterer documentation overview, it says

If providing some form of combined graphic attribute information for multiple graphics is desired for the non-interactive grouping symbol, you could use a creative solution like using the ESRI.ArcGIS.Client.GraphicsLayer.FindGraphicsInHostCoordinates in the Map Control to determine via a mouse click if the non-interactive grouping symbol was found and display a custom UIElement back to the user with the desired information


And in the GraphicsLayer.FindGraphicsInHostCoordinates() documentation it reads:

If the System.Windows.Point location finds a clustered graphic, the individual graphics that the cluster represents will be returned


Can anyone tell me what I'm missing here?
0 Kudos