Select to view content in your preferred language

Consume a vtpk with multiple sources in Field Maps

805
2
05-05-2023 01:40 AM
OttarValvåg
Esri Contributor

We have nationwide vtpks with a basemap and elevation contours for all of Norway. For performance, data management and flexibility reasons the elevation contours are kept in a separate vtpk from the rest of the basemap, and combined to a single service using a style with several sources.

We would like to create (clip/export) a new single vtpk from the above sources, which contains a basemap that includes the elevation contours, so that we can take these multi-source services offline without losing the elevation contours in the process.

Since both ArcGIS Pro and Field Maps support vector tile services with multiple sources, we are hoping that they can also both recognize vector tile packages with multiple sources.

The following workflow works when using ArcGIS Pro as the client consuming the vtpk:

1. Export the area of interest from the nationwide basemap vtpk to a new vtpk

2. Export the area of interest from the elevation contours vtpk to a new vtpk

3. Unzip and combine the two exported vtpks into a new vtpk, edit the style in the combined vtpk to refer to two sources. Here is an example result from this process:

https://geodata-gdonline-gdo-processing-temp.s3.eu-north-1.amazonaws.com/to_esri/GeocacheNorgeTerren...

The example actually includes three sources - a basemap, elevation contours, and a source containing hillshading polygons.

Excerpts from p12/resources/styles/root.json:

{
  "version": 8,
  "sprite": "../sprites/sprite",
  "glyphs": "../fonts/{fontstack}/{range}.pbf",
  "sources": {
    "esri": {
      "type": "vector",
      "url": "../../"
    },
    "contours": {
      "type": "vector",
      "url": "../../contours/"
    },
    "hillshade": {
      "type": "vector",
      "url": "../../hillshade/"
    }
  },
  "layers": [
 
File structure inside the vtpk:
combined-vtpk-structure.png

The combined vtpk was created by unzipping the constituent vtpks, and copying the p12 contents of the contours and hillshade vtpks into the p12/contours and p12/hillshade folders respectively. Then the p12/resources/styles/root.json file was modified to include multiple sources, and then the whole thing was rezipped into a vtpk. 

This combined vtpk displays perfectly in ArcGIS Pro, but Field Maps does not recognize it, and yields a generic "Internal error" error message when we try to open the vtpk.

My (long-winded) question is, is there a way to further tweak this vtpk to make Field Maps recognize it? Both ArcGIS Pro and Field Maps support vector tile services with multiple sources, so we are hoping that they can also both recognize vector tile packages with multiple sources.

Thanks,

Ottar Viken Valvåg

Geodata AS

2 Replies
PaulLohr
Frequent Contributor

Ottar,

Have you tried this workflow with the Android version of Field Maps with the logs enabled? Sometimes the Android version of Field Maps produces helpful log messages while the iOS version does not. 

0 Kudos
OttarValvåg
Esri Contributor

Thank you for the suggestion. I've attached the logs, covering an attempt where I activated the app, downloaded a prepared map area with one of our "special" vtpks, and opened it. I then got the "Internal error" message, but I don't see any related messages in the logs, unfortunately.

0 Kudos