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.
Solved! Go to Solution.
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.
Please check out the attached demo project. It looks like the screenshot.
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.
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?
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.
I reset all changes and now that is the only line I changed. This is what I see.
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...
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.
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.
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.