arcgis-maps-sdk-dotnet-toolkit
arcgis-maps-sdk-dotnet-toolkit copied to clipboard
Compass clicked Event
It would be nice to have an event that is called wyhen the compass gets clicked. And also an option to disable the resetting rotation when it is clicked.
Thank you for this and the PR.
Since this is introducing new APIs we'd have to go through an API review with the other Toolkits first. To help that, could you describe some real-world scenarios where this is needed:
It would be nice to have an event that is called when the compass gets clicked.
Also things to consider: Resetting rotation only happens if you bind it to the geoview. You can instead bind the heading to the MapView's MapRotation property and it wouldn't be able to reset (as it doesn't have a mapview to act on). I admit it's a little subtle difference, and not obvious, but the ability is there today. On WPF and UWP you can also set IsHitTestVisible="false"
to disable any clicking.
Wrt a clicked event, you can use the built-in platform events for detecting clicks as well (like MouseDown/Tapped etc).
First of all thanks for the quick response.
could you describe some real-world scenarios where this is needed:
I am currently working on an App where I wanty to give the user a choice setting the heading of the Map fixed to the north or relative to the heading of the phone. And I thought the compass would be a great way to represent this toggeling. The same functionality is also used in the GoogleMaps App.
Resetting rotation only happens if you bind it to the geoview
I haven't thought about that but thats a great idea.
you can use the built-in platform events for detecting clicks
I have to test this. If so you didn't need my proposed PR.
I was testing your proposal to use the built-in platform events for detecting clicks but I think that wouldn't work in Xamarin.Forms