Closed mmoosbac94 closed 3 months ago
Thanks for reaching out. Next time, please ask the question on Esri Community. This repo is for publishing the Swift Package and questions related to the API should be asked on the forum instead.
In regard to your question, it is an expected behavior. When a new map is set on the map view, the map view doesn't update immediately (map loading, view rendering, etc.). So if you call the setViewpoint
with animation immediately after the map is set, the async call can be interrupted.
The solution is to set the desired viewpoint as the initialViewpoint
on the map property. Such as
map = Map(basemapStyle: .arcGISTopographic)
map.initialViewpoint = Viewpoint(latitude: 34.02700, longitude: -118.80500, scale: 72_000)
so that the map view will zoom to the initial viewpoint once loaded.
Its working now! Thank you very much for your help. Next time I will refer to the Esri Community.
Hello everybody,
we are currently facing the issue, that we want to set a map and immediately afterwards a viewpoint. If we do that, the map is set but the viewpoint is not. So the call "proxy.setViewPoint" fails with "false". Pseudo-Example to demonstrate:
Do you have an idea what is the issue or how to solve it?
Thank you guys Marvin