Hi,
I am using ArcGIS Pro 3.3.1 and ArcGIS Map SDK 1.6.
I am trying to create an offline map in a Unity scene so I downloaded my map through ArcGIS Pro as a .vtpk file.
It is possible to load this file offline from the assets folder as a basemap. But I have problems to load the elevation.
I tried to load the .vtpk as a elevation source. This does not work. I even tried to add it to the layers as a ArcGIS Vector Tile Layer. Nothing.
After that, I used the analysis tools to manage the tile cache and then exported it as .tpk and .tpkx file in ArcGIS Pro.
I tried to use these files as elevation source but it did not work. I even tried to load it via Code. No chance.
1.What did I do wrong? Could you please provide a step-by-step guide on how to load a map offline in Unity with both a basemap and an elevation layer.
2. I’m not seeing the Nova Basemap style on my .vtpk basemap. The file name suggests that I downloaded a Nova basemap, so I’m not sure why it’s not displaying correctly.
Thank you for your help!
Hi,
The first part of your approach is correct - basemaps for offline use are either a vector tile layer (.vtpk) containing features such as streets, etc, or an image tile layer (.tpkx) typically used for aerial/satellite imagery.
Elevation is also an image tile layer, but the tiles need to be generated as a LERC-encoded.
You'll need to follow the steps in this topic to create a tile package for elevation Share a tile package—ArcGIS Pro | Documentation, and specifically you're going to follow the section Create a tile package for a web elevation layer.
Summary:
To create a tile package that publishes an offline elevation layer, the following must be true:
If you're not working in the coordinate system Web Mercator Auxiliary Sphere (i.e. ArcGIS Online, etc) and instead you're working in local/projected coordinate system then you'll need to use the Generate Tile Cache Tiling Scheme tool with Tile Format set to LERC Compression to generate a new LERC tiling scheme based on your elevation dataset. You should use the same spatial reference as the basemap vector tile package you're creating.
Then create a tile package using the Manage Tile Cache tool to generate a LERC cache. For Input Tiling Scheme, use one of the following:
And finally use the Export Tile Cache tool with the Export Cache As option set to Tile package (.tpkx).
For example, the image below shows a raster dataset as an elevation surface layer I've added in ArcGIS Pro (and used 20x exaggeration for effect):
And then I've used the Manage Tile Cache geoprocessing tool to create a new cache where the Input Tiling Scheme parameter is Elevation Tiling Scheme (which means it matches the ArcGIS Online/Bing Maps/Google Maps tiling scheme used by ArcGIS Online basemaps):
And next I used the Export Tile Cache tool to create a tile package (.tpkx):
I tested the new TPKX file while I was in ArcGIS Pro to ensure it worked there (the TOC shows the .tpkx file):
And lastly, here it is in Unity (looked better in this case with the imagery basemap):
I've opened an internal issue to update our documentation to assess how we can better describe this process for creating tile basemap and elevation tile packages for use with our SDKs.
Thanks
Thank you so much for your step-by-step guide on importing elevation data into Unity, it worked perfectly!
However, I've noticed that sometimes ArcGIS Pro gets stuck when I use the Manage Tile Cache tool. It reaches 100% but never finishes, remaining in a pending state. I found that defining an area of interest helped resolve this issue, and it's sufficient for now.
Could you please explain how I can import custom basemaps for offline use? In my earlier message, I described the issue with the Nova map. I have a basemap in a .vtpk file, but it's not the Nova map. it looks different.
Thank you!