Add a new Ui-Element

Nov 9, 2013 at 4:38 AM
Edited Nov 9, 2013 at 5:07 AM
Hi
Can you tell me how can add a UI-Element into a layer and add event (like click, tap...) to to this element

Next question:

Can you tell me how can I add a event when user click a point on the map and get the location (X,Y) of this point?

Thnks

Ps: You're very kind! :D
Nov 16, 2013 at 3:18 PM
Edited Nov 16, 2013 at 3:24 PM
There is no support for a UIEment layer in Mapsui. What you could do is create the UIElements in an overlay and position those on the canvas on the ViewChanged event. You could look at the XamlRenderer to learn how this can be done.

You could use the MapControlMouseLeftButtonDown. You could also bind your own even that the MouseLeftButtonDown/Up and look at the implementation of MapControlMouseLeftButtonDown in the MapControl.