Hello,
I have a XamMap with a layer which consists of a number of points and I need to output a dialog at this point's position by ElementClick. I can get WorldRect of the clicked MapElement. How can I convert it to window coordinates? Or is there any other way to get coordinates of the clicked point?
Thank you.
Hi Sergey,The following article provides information on point coordinates projecting to xamMap: link. In your case, you want to unproject the coordinates, so UnprojectFromMap could be used, for example: private void theMap_ElementClick(object sender, MapElementClickEventArgs e) { Point pt1 = theMap.MapProjection.UnprojectFromMap(new Point(e.Element.SymbolOrigin.X, e.Element.SymbolOrigin.Y)); ... }Best Regards,Milana Zhileva
Thanks for your response. But how can I get window coordinates of the clicked element?