Automating basemap .vtpk creation for offline use

248
2
a month ago
cweirpatrickco
Occasional Contributor

I need to create .vtpk's of ESRI's topo basemap for offline use in an ArcGIS runtime application. In an ideal world I'd develop a script tool that takes an input county polygon and zooms to each feature geom and creates a topo basemap .vtpk for each feature geom.

The problem: the "arcpy.management.CreateVectorTilePackage()" GP tool spits this error when trying to process the topo basemap... "ERROR 001852: Layer type is not supported for vector tile packages."


The only other way I know how to create basemap .vtpk's is with the "Download Map" ribbon tool in Pro... but this process is manual.

cweirpatrickco_0-1728588387405.png


The question
: Is there a way to automate ESRI basemap .vtpk creation??

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @cweirpatrickco, do you have any AGOL imagery basemaps (i.e. World Topographic Map, World Hillshade) added to the Pro map you are trying to package?  If so, these will need to be removed to run the tool successfully.

0 Kudos
cweirpatrickco
Occasional Contributor

Hey @JakeSkinner, the only basemap layer I have in my TOC is "World Topographic Map (for Export)"... which is the layer I'm wanting to export to .vtpk.

cweirpatrickco_0-1728921676569.png

 

0 Kudos