Skip to main content

Share map image layers from vector tile content

You can share map image layers that reference style resources using ready-to-serve vector cache datasets via the ArcGIS API for Python. These map image layers can be used to create cache tiles that allow for rendering in clients that do not support WebGL.

Share a map image layer

To share a map image layer from vector tile content, do the following:

Note:

This workflow requires ArcGIS Pro and the ArcGIS API for Python.

  1. In ArcGIS Pro, use the Extract Package tool to extract the Vector Tile Package (.vptk) in a ready-to-serve format that you can share a map image layer from.

    A ready-to-serve .vtiles folder is created.

  2. Update the URL parameter in the ../resources/styles/root.json file of your vector style resource to reference the .vtiles folder created in the previous step.

    • Custom style referencing a single ready-to-serve .vtiles resource:

      Example:

          {
           "version" : 8,
           "sprite" : "../sprites/sprite",
           "glyphs" : "../fonts/{fontstack}/{range}.pbf",
           "sources" : {
             "esri" : {
                "type" : "vector",
                "url" : "<../relative path to the .vtiles folder>"
                }
              },
          }
      
    • Custom style referencing multiple ready-to-serve .vtiles resources:

      Example:

          {
             "version": 8,
             "sprite": "../sprites/sprite",
             "glyphs": "../fonts/{fontstack}/{range}.pbf",
             "sources": {
                "esri": {
                   "type" : "vector",
                   "url" : "../<FolderName>.vtiles"
                   },
                "contours": {
                   "type": "vector",
                   "url": "../<FolderName>.vtiles"
                   },
                "hillshade": {
                   "type": "vector",
                   "url": "../<FolderName>.vtiles"
                }
             },
          }
      
  3. Add a folder data store item in the organization for the path of the source vector tile content.

  4. Provide a location where the raster tiles will be generated as a cache data store. This can be either a folder store or a cloud store.

  5. In ArcGIS Pro, define the tiling scheme of the map image layer.

  6. Configure and publish the map image layer.

You can manage the cache for the map image layer in ArcGIS Pro using the Caching toolset. It is recommended that you pre-generate top levels with the Manage Map Server Cache Tiles tool and generate cache on demand for areas that are not frequently accessed by users. These services use shared map service instances. For better throughput of cache on demand, increase the number of map instances or use dedicated instances and increase its number of instances.

Note:

These services cannot be managed in ArcGIS Server Manager.

Update your map image layer

When the source vector tile content or styles have been updated, you can update your map image layer. See the Overwrite map image layer with new vector tile content topic in the ArcGIS API for Python documentation for more information.