Select to view content in your preferred language

The base map cannot be loaded in Arcgis maps SKD for Unity

125
3
Jump to solution
a week ago
YunshuoTang
New Contributor

The base map cannot be loaded in Arcgis map SKD in Unity.

I used unity 2022.3.38f1 and high 3d definition as templet on windows 11. I tried many times to input my API key and load base map. But it always fails to load. 

Could anyone help me with it? Thank you so much

0 Kudos
1 Solution

Accepted Solutions
and1
by Esri Contributor
Esri Contributor

I would first try going through the "Why is my data not displaying in the map?" answer list in the FAQ section:

https://developers.arcgis.com/unity/faq/#troubleshooting

 

Before troubleshooting layer loading issues, make sure that you have added an ArcGIS View State Logging Component. This component notifies you of any updates to the status of layers, elevation sources, and the view. These events tell you whether your data is active, if it fails to load, or any usage warnings that come with using a specific dataset to help you determine when there is a problem with your GIS data. If the view state log doesn't give you the exact information you need, you can follow the checklist below:

  1. Check that your camera is looking at the correct area. If you are using the Map Creator UI, you can use zoom to to go to your data extent.

  2. Check that you use supported format for basemaps and data layers and elevation layers.

  3. If you are adding 3D object scene layers or Integrated mesh scene layers, your file needs to be version 1.7+. You can check this by opening the JSON file that is associated with the service. For the online services, if the JSON content is not displayed by accessing the service URL, try to add ?f=json at the end of the service URL to access the content. For local data, you can extract the file as a zip archive, and open the .json file.

  4. Check if your spatial reference is supported by the map type. Global scenes support all the geographic coordinate systems. For a projected coordinate system, only Web Mercator (Auxiliary Sphere) (WKID: 3857) is supported. Local scenes support all projected coordinate systems. For the geographic coordinate system, WGS84 (WKID: 4326) and China Geodetic Coordinate System 2000 (WKID: 4490) are supported.

  5. Your data's spatial reference may differ from your ArcGIS Map's spatial reference which prevents your data from loading. This is because ArcGIS Maps SDK for Unity uses the first layer added (oftentimes the basemap) to determine the spatial reference for the ArcGIS Map. In this case, reset the spatial reference of ArcGIS Map by removing the existing basemap/first layer and adding the new layer as the first layer. Make sure to save the level and reload for ArcGIS Map to be updated for the editor mode.

  6. When you use a private online service in your app, you need to set up OAuth 2.0 with user authentication or application credentials. Private online services are loaded only after successful authentication.

  7. If all of the above are correct and your data is loaded in other products like ArcGIS Pro, your data might be corrupted or saved in an old format. Try to export the file package again or republish the service.

View solution in original post

3 Replies
mz12345
New Contributor II

Could you please share some screenshots of your scene/code? Is it giving you an error message?

YunshuoTang
New Contributor

Thank you, I restarted the project, and the issue disappeared by itself.

0 Kudos
and1
by Esri Contributor
Esri Contributor

I would first try going through the "Why is my data not displaying in the map?" answer list in the FAQ section:

https://developers.arcgis.com/unity/faq/#troubleshooting

 

Before troubleshooting layer loading issues, make sure that you have added an ArcGIS View State Logging Component. This component notifies you of any updates to the status of layers, elevation sources, and the view. These events tell you whether your data is active, if it fails to load, or any usage warnings that come with using a specific dataset to help you determine when there is a problem with your GIS data. If the view state log doesn't give you the exact information you need, you can follow the checklist below:

  1. Check that your camera is looking at the correct area. If you are using the Map Creator UI, you can use zoom to to go to your data extent.

  2. Check that you use supported format for basemaps and data layers and elevation layers.

  3. If you are adding 3D object scene layers or Integrated mesh scene layers, your file needs to be version 1.7+. You can check this by opening the JSON file that is associated with the service. For the online services, if the JSON content is not displayed by accessing the service URL, try to add ?f=json at the end of the service URL to access the content. For local data, you can extract the file as a zip archive, and open the .json file.

  4. Check if your spatial reference is supported by the map type. Global scenes support all the geographic coordinate systems. For a projected coordinate system, only Web Mercator (Auxiliary Sphere) (WKID: 3857) is supported. Local scenes support all projected coordinate systems. For the geographic coordinate system, WGS84 (WKID: 4326) and China Geodetic Coordinate System 2000 (WKID: 4490) are supported.

  5. Your data's spatial reference may differ from your ArcGIS Map's spatial reference which prevents your data from loading. This is because ArcGIS Maps SDK for Unity uses the first layer added (oftentimes the basemap) to determine the spatial reference for the ArcGIS Map. In this case, reset the spatial reference of ArcGIS Map by removing the existing basemap/first layer and adding the new layer as the first layer. Make sure to save the level and reload for ArcGIS Map to be updated for the editor mode.

  6. When you use a private online service in your app, you need to set up OAuth 2.0 with user authentication or application credentials. Private online services are loaded only after successful authentication.

  7. If all of the above are correct and your data is loaded in other products like ArcGIS Pro, your data might be corrupted or saved in an old format. Try to export the file package again or republish the service.