Download vector tiles to local cache
Export tiles from an online vector tile service.
Field workers with limited network connectivity can use exported vector tiles as a basemap for use while offline.
How to use the sample
When the vector tiled layer loads, zoom in to the extent you want to export. The red box shows the extent that will be exported. Click the "Export Vector Tiles" button to start the job. An error will show if the extent is larger than the maximum limit allowed. When finished, a dialog will show the exported result in a new map view.
How it works
- Create an
ArcGISVectorTiledLayerfrom the map's base layers.
- Create an
ExportVectorTilesTaskusing the vector tiled layer's URL.
- Create default
ExportVectorTilesParametersfrom the task, specifying extent and maximum scale.
- Create a
ExportVectorTilesJobfrom the task using the parameters, and specifying a vector tile cache path and an item resource path. The resource path is required if you want to export the tiles with the style.
- Start the job, and once it completes successfully, get the resulting
- Get the
VectorTileCachefrom the result to create an
ArcGISVectorTiledLayerthat can be displayed to the map view.
NOTE: Downloading Tiles for offline use requires authentication with the web map's server. To use this sample, you will require an ArcGIS Online account.
Vector tiles have high drawing performance and smaller file size compared to regular tiled layers, due to consisting solely of points, lines, and polygons. However, in ArcGIS Maps SDK they cannot be displayed in scenes. Visit the ArcGiS Online Developer's portal to Learn more about the characteristics of ArcGIS vector tiled layers.
cache, download, offline, vector