How know state of Map?
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 Ivan. We've updated the sample accordingly.
Katy
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.
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 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.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.