Hi, I my code, I want to be able to zoom to a point or extent on the map. How can I do that?
The user can enter an address, and an API call returns the coordinats, which I am using to create a Graphic on the map:
MapPoint houseNumberToDisplay = new MapPoint(HouseNumberToMap.geometri.coordinates[0][0], HouseNumberToMap.geometri.coordinates[0][1], sr);
CreateGraphics(houseNumberToDisplay);
I got a Map property thats binding to the xmal:
<esri:MapView x:Name="MainMapView"
Map="{Binding Map}"
Grid.ColumnSpan="2"
Background="White"
GraphicsOverlays = "{Binding GraphicsOverlays}"
/>I am trying to create a mapView object and set the Map object to the mapView object, so i can use the 'SetViewpointAsync' method. But I get this error message:
System.Windows.Markup.XamlParseException: ''Set property 'Esri.ArcGISRuntime.UI.Controls.MapView.Map' threw an exception.' Line number '79' and line position '23'.'
ArcGISRuntimeException: Object is already owned: Already owned.
What am I missing?