Hi,
I use XamMap with two layers (.shp file layer and SymbolLayer)
The map.ElementClick event gets fired for the SurfaceElements in the shape file, but not for the elements in the symbollayer.
<igMap:MapLayer x:Name="shpLayer" DataMapping="Name=MicroMarket; Value=MetricValue" ToolTip="custom tooltip: {Value}" FillMode="Chloropleth" Imported="MapLayer_Imported">
<igMap:MapLayer.Reader>
<igMap:ShapeFileReader Uri="shapefile" DataMapping="Name, Caption=Id" />
</igMap:MapLayer.Reader>
</igMap:MapLayer>
<igMap:MapLayer x:Name="symbolLayer" VisibleFromScale="55" >
<igMap:MapLayer.ValueTemplate>
<DataTemplate>
<Image Source="{Binding ImageUrl}" ToolTipService.ToolTip="{Binding ToolTip}" />
</DataTemplate>
</igMap:MapLayer.ValueTemplate>
map.ElementClick += (s, e) =>
{
if (e.Element != null && e.Element is SymbolElement)
//doesn't come here :(
}
if (e.Element is SurfaceElement)
MessageBox.Show(string.Format("You clicked surface element {0}", e.Element.Name));
};
If I add an eventhandler on the Image_MousLeftButtonDown for the image it works, but I rather have the map.ElementClick because I want to add the event in another class where I have access to the map and I can handle the clicks in one cosistent way.
Thanks in advance
Hi RoelMartens,
I have been able to reproduce the issue and I have logged it as issue #73696. We are currently working on a fix for this that should be in the next SR.
Thank you for reporting this issue.
Regards,
Ivan Kotev