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
Hi Ivan,
Thanks for the reply. Do you now when the next SR is scheduled? Is there a possibility for a hotfix?
Thanks,
Roel
I upgraded to the May SR and I still can't get it to work. I have the same code as in my first post. The click event does not fire for elements in my symbolLayer. For the ShapeLayer, the event fires 44 times! (not there are also 44 shapes in my shapefile).
Both layers have IsClickable set to true.
The version of my dll's are
10.3.20103.2192
Any ideas on how to resolve this?
Hi Roel,
I have tested the same version and it seems to work. Could you check if MapLayer's and SymbolElements's IsSensitive is set to true. If it is set to false then XamMap doesn't rise the ElementClick event.
It works now!
Thanks
Hello,
Infragistics Team
We purchased new version 11.1 and still the click for symbol element is not firing when we use mapelemnt_click. we set all the other properties issensitivity = true, isselected=true and isclickable=true. Can you please help us in this one. The new service release you are talking about is included for 11.1? if yes, please help us in firing event.
Vamsi.
Hi, vamsi2654,
Please, find attached a sample application () for the MapElementClick's firing. The only thing that needs to be done in order to get it working is to add Infragistics dlls.
Feel free to write back should you need any further information.
Best regards,Milana Zhileva