Hello,
I'm using Unity 2022.3.42f and ArcGIS Maps SDK for Unity version 1.6.0.
I'm trying to follow the tutorial here: https://developers.arcgis.com/unity/maps/tutorials/display-a-map-api/
I have an API key, as shown in the first image. I have all the code copied. Both the map component and the camera are successfully created, but the map itself doesn't show. The inspector for the map component doesn't show the basemap, elevation, or layers either, as shown in the second image.
I have also tried using the map creator UI and samples and gotten similar results, making me inclined to believe that the issue is with my API key or request. When I check the developer credentials, it also says that the API key has had no usage.
Thanks for the help, sorry if this post was silly.
I am having the same issue, were you able to solve it?
Hello,
Hi, I am having the same issue when using the map creator UI (I have not tried the API method). I can confirm I cannot load any of the sample scenes: I am getting a "no viewport" error in every case.
The following link tells me that means "there is not a valid camera, viewport properties, or spatial reference" but I fail to see how that can be the case even in the samples.
ArcGISViewStatus | ArcGIS Maps SDK for Unity | Esri Developer
Are you loading the sample scenes individually or through the Sample Viewer UI? How do you set the API key (project settings, ArcGISMap Actor, or Sample Viewer UI)?
I am loading the sample scenes through Unity individually, by double-clicking on each scene.
I set the API key by clicking on the ArcGISMap GameObject that gets created and setting the API key there. I have also tried setting the API key in the Map Creator UI panel:
In every case I am getting the same error, with no map data being loaded:
Hi, sorry for the ping. I am still facing the same issue - the map does not load even now. What options can I try to get it to work?
In every case I am getting the same error, with no map data being loaded:
Hi, it is a bit difficult to tell what is going on since loading the sample scenes should definitely work, here are a few ideas to debug the issue:
Hi, thank you for the reply. I tried verifying whether the API key still works and I got error 498. Apparently this means the access token is expired or invalid? I regenerated the token by going to my token credentials and found that the new regenerated key is working.
The API key was not supposed to expire for two more weeks. I set the expiration date of the newly regenerated key to be at the end of 2024 for now. Is there a reason why the key expired prematurely? How can I prevent this happening for future keys?
Glad it is working now. I am not sure why the API key would expire. It shouldn't have happened. If this happens again, please let us know (possibly in the general developers community)