Select to view content in your preferred language

Always error and white screen when using the Vector base map on 'ProMax' iPhone.

192
5
Jump to solution
a week ago
ZhouYi
by
Emerging Contributor

My dev device is an iPhone 15 ProMax with iOS 26. And the version for ArcGIS Swift SDK is 100.15.6.

If I create a map with this code:

AGSMap(basemapType: "StreetsVector", latitude: 42, longitude: -73, levelOfDetail: 5)

An error always happens, and the map view will be white. Here is the error message:

Printing description of err:

▿ Optional<Error>

  - some : Error Domain=com.esri.arcgis.runtime.error Code=18 "Internal error." UserInfo={NSLocalizedFailureReason=, NSLocalizedDescription=Internal error., Additional Message=}

Printing description of $R0:

Internal error.

But if using the basemap without vector, such as this:

AGSMap(basemapType: "Streets", latitude: 42, longitude: -73, levelOfDetail: 5)

The map can display correctly without any error.

 

Another information is I tried on other real deives with the same code, here is the result:

iPhone 16  --> Work

iPhone 17 Pro Max --> Error

iPad mini 5 --> Error

iPhone 16 Pro --> Work

iPhone SE 2--> Work

If anyone encounters a problem similar to mine or has some idea about my problem, we can discuss it together. Thank you for being so helpful~

0 Kudos
1 Solution

Accepted Solutions
Nicholas-Furness
Esri Regular Contributor

Hi. That constructor is marked as deprecated. You should use this instead, and set the Map's initialViewpoint or the MapView's viewpoint (see this tutorial). You'll need to convert your zoom level 5 to a scale value (see this tool).

Please let us know if you still see the issue with that constructor.

View solution in original post

5 Replies
Nicholas-Furness
Esri Regular Contributor

Hi. That constructor is marked as deprecated. You should use this instead, and set the Map's initialViewpoint or the MapView's viewpoint (see this tutorial). You'll need to convert your zoom level 5 to a scale value (see this tool).

Please let us know if you still see the issue with that constructor.

ZhouYi
by
Emerging Contributor

Thanks for your help!

I will try it and provide more information.

0 Kudos
ZhouYi
by
Emerging Contributor

Hi Nicholas, Thanks for your help. Your solution can help me to fix the issue.

But for our production environment, we  never used an apikey. So that I have 2 question about this issue.

1.Is using apikey and this constructor the most populate? 

2. Why this issue happend? (I guess these 2 constructor request different basemap url, does it correct?)

Thanks~

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Hi @ZhouYi.

Glad that solution works. With respect to your questions:

1) Yes, many developers make use of API Keys and the Location Platform basemap services (and so use this constructor). It's a popular way to enable access to our high quality up-to-date basemaps (and other location services) for apps where the app users do not sign in with an ArcGIS Online or ArcGIS Enterprise account.

2) Since 2022, many developers have been required to use our modern, metered basemap services through Location Platform. You can learn more about this requirement and our full terms of use here.

In short (though please read that page for full details): if your application does not require your users to sign in with their ArcGIS Online or ArcGIS Enterprise account, then this most likely applies to you. In that case, API Keys are the appropriate way to access those basemaps. Bear in mind that you get a generous free basemap allowance.

If you are building an application for ArcGIS Online or ArcGIS Enterprise users where those users will sign into the app with their ArcGIS account, then you might not need to use API Keys. In that case your app can enable basemap access for those users by allowing them to sign in with their ArcGIS account.

Nicholas-Furness
Esri Regular Contributor

One thing I would add: the ArcGIS Runtime SDK for iOS is now in Mature Support. You should really consider migrating to the ArcGIS Maps SDK for Swift if at all possible.

0 Kudos