AGSScene basemap style

779
8
Jump to solution
11-09-2022 11:50 AM
decay
by
New Contributor II

I am trying to create an AGSScene modifying the Animate 3D example from the arcgis-ios-sdk-samples.

I am trying to change the map to .arcGISStreets, but get nothing but a blank grid.  Is this because .arcGISStreets is a 2D map, and the AGSScene says it only represents 3D, because .arcGISStreetsRelief does render.

Thanks.

Tags (5)
0 Kudos
1 Solution

Accepted Solutions
decay
by
New Contributor II

I figured it out.  I was setting the API key manually, instead of using the .secrets file.  This confused me as the street view inside the inset map loaded fine, and the one loaded fine in the sample project.  Once I set it in the .secrets file, the sample sdk project loaded the map just fine. 

View solution in original post

8 Replies
Ting
by Esri Contributor
Esri Contributor

Please check out the attached demo project. It looks like the screenshot.

scene-with-streets-basemap.png

There might be a couple of reasons that causes a blank screen, or screen without map.

- Verify you are using a valid API key. If not, it shows a blank screen with an Esri attribution bar at the bottom.

- Make sure you are using the `AGSScene.init(basemapStyle:)` initializers.

- Don't forget to assign the scene to the scene view.

0 Kudos
decay
by
New Contributor II

Thanks Ting.

Your project worked just fine.  I modified the Animate 3D Graphic code to use .arcGISStreets, and it displayed a blank grid, but if I put it back with .argcGISStreetsRelief or any other 3D map, it displayed fine.  Could it have something to do with the extra layers for the 3D model?

0 Kudos
Ting
by Esri Contributor
Esri Contributor

Ting_0-1668031963425.png

Did you make the change on this line? Did you make any other changes?

The sample still works fine for me and the street basemap is showing. See attached GIF.

animate-3d-graphic.gif

0 Kudos
decay
by
New Contributor II

I reset all changes and now that is the only line I changed.  This is what I see.

 

Screen Shot 2022-11-09 at 5.23.21 PM.png

0 Kudos
Ting
by Esri Contributor
Esri Contributor

Sorry I didn't ask in the first place - what version of ArcGIS Runtime SDK for iOS are you using? What you are seeing might be related to a rather recent change in 100.13.0: https://developers.arcgis.com/ios/release-notes/prior-releases/release-notes-for-100-13/#vector-tile... If you are using a version older than that, then you cannot use the streets vector basemap style in a 3D scene, but instead you need to use the deprecated streets basemap (raster version).

 

See the older 100.12.0 tagged version of the repo: https://github.com/Esri/arcgis-runtime-samples-ios/blob/v100.12.0.2/arcgis-ios-sdk-samples/Scenes/An...

0 Kudos
decay
by
New Contributor II

Package dependencies listed are both 100.15.0 for arcgis-runtime-ios, and arcgis-runtime-toolkit-ios.  Your sample project loads just fine though, oddly enough, also using 100.15.0.

0 Kudos
decay
by
New Contributor II

I figured it out.  I was setting the API key manually, instead of using the .secrets file.  This confused me as the street view inside the inset map loaded fine, and the one loaded fine in the sample project.  Once I set it in the .secrets file, the sample sdk project loaded the map just fine. 

Ting
by Esri Contributor
Esri Contributor

Ah, glad you figured it out! 🎉 I'm about to scratch my head now.

Yep, one of the quirks of the sample viewer app is that it uses a global API key for all samples, so it kind of hides the importance of setting up API key for each (remote) mapping service. If you configure them separately, then both the minimap and the scene would require the API key being set.

0 Kudos