How know state of Map?
Solved! Go to Solution.
The editor can't be activated while the map view spatial reference has not been established.
To know that, you can either subscribe to MapView.SpatialReferenceeChanged event, or wait for all layers to load by using MapView.LayersLoadedAsync:
await MyMapView.LayersLoadedAsync();
The editor can't be activated while the map view spatial reference has not been established.
To know that, you can either subscribe to MapView.SpatialReferenceeChanged event, or wait for all layers to load by using MapView.LayersLoadedAsync:
await MyMapView.LayersLoadedAsync();
thanks for replying, the code I show is the example of Area and Perimeter, sometimes it works and sometimes not, use mapView1.LayersLoadedAsync await() and also sometimes works and sometimes does not, any answer thanks in advance.
Due to the async loading of the map view, use the spatial reference changed event, rather than waiting for the layers loaded as suggested by Dominique. This is more reliable since the spatial reference might or might not have been established when the layers loaded, depending on the network traffic and timings.
Thanks and you can fix it, one more question, as I can save the drawn polygon, then when you look at the polygon information is loaded.
Thank you again.
Thanks Ivan. We've updated the sample accordingly.
Katy