Esri / arcgis-runtime-samples-ios

Swift samples demonstrating various capabilities of ArcGIS Runtime SDK for iOS
https://developers.arcgis.com/ios
Apache License 2.0
324 stars 396 forks source link

Zoom right after map loading (using 100.1.1) #342

Closed ddcrobert closed 6 years ago

ddcrobert commented 6 years ago

I'm using pod 'ArcGIS-Runtime-SDK-iOS', '100.1.1' (I can't use 100.2 due to the minimal version being too aggressive).

I'm using a AGSArcGISVectorTiledLayer as a basemap. Then I specified the layerViewStateChangedHandler. Within it I wait until there is two AGSArcGISVectorTiledLayer (the basemap seems to be a group layer of two) with an "Active" state. Then I try to zoom with setViewpointCenter.

Sometimes it works, sometimes it doesn't (no viewpoint changes). I tried with a delay (I don't like that but back in 10.2, the loaded state wasn't quite usable, usually have to wait a bit), without success.

Thankfully the runtime is logging an error when it doesn't work ArcGIS Runtime Error Ocurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error: Error Domain=com.esri.arcgis.runtime.error Code=2 "Invalid argument" UserInfo={NSLocalizedFailureReason=The input spatial reference is not equivalent to the owning spatial reference., NSLocalizedDescription=Invalid argument, Additional Message=The input spatial reference is not equivalent to the owning spatial reference.}

PrasadPotale commented 6 years ago

Are you able to fix this issue?