I have a C# Xamarin Forms UWP Application displaying a map in the MapView. The client want to add a North Arrow to the map.
After hours of googling I have no idea of how to do this.
My code is very similar to this official Arcgis example
How would I add a North Arrow to a map like that.
Bonus topic - if the map is rotated (as per one of the other example in that project) I would like the arrow to keep pointing in the right direction.
We are on version 100.6 of Esri.ArcGISRuntime and Esri.ArcGISRuntime.Xamarin.Forms
Solved! Go to Solution.
The toolkit provides a control that does this for you.
First add a reference to the toolkit nuget Esri.ArcGISRuntime.Toolkit.Xamarin.Forms
And see example here how to use it:
arcgis-toolkit-dotnet/CompassMapViewSample.xaml at main · Esri/arcgis-toolkit-dotnet · GitHub
Alternatively you can use just an image of an arrow, and listen for the MapView's MapRotation property to change using the PropertyChanged event, and then rotate the image accordingly.
The toolkit provides a control that does this for you.
First add a reference to the toolkit nuget Esri.ArcGISRuntime.Toolkit.Xamarin.Forms
And see example here how to use it:
arcgis-toolkit-dotnet/CompassMapViewSample.xaml at main · Esri/arcgis-toolkit-dotnet · GitHub
Alternatively you can use just an image of an arrow, and listen for the MapView's MapRotation property to change using the PropertyChanged event, and then rotate the image accordingly.
Thanks worked great