Esri/arcgis-runtime-samples-ios

Zoom right after map loading (using 100.1.1)

ddcrobert opened this issue · 1 comments

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.}

Are you able to fix this issue?