I want to be able to style the data, etc in Pro but I need to access 3rd party vector tile servers outside of AGOL or Portal.

629
7
11-07-2018 02:11 PM
Status: Open
Labels (1)
Occasional Contributor

There are tons of Vector Tile sources available in the wild but it appears that I can only access Vector Tiles that are hosted on AGOL/Portal.  Is this true?  Please provide support for the Mapbox Vector Tile spec in ArcGIS Pro.  There is already GDAL driver support: MVT: Mapbox Vector Tiles 

Thank you!

7 Comments

Can you share details about how you're trying to add vector tiles to your map in Pro?  Is the expectation to go to Add data from path:

How do you plan to use the vector tiles in Pro?

In the above image I added Mapbox basemaps to ArcGIS Online webmaps and am using those in Pro.

Thanks Kory.  Let me give this a go via the URI path option.  I was not aware of that route.

Wait - that was a question on the Pro side:)  What you would do is get the URL from the Mapbox site for Third Party > ArcGIS Online and follow the instructions:

In an ArcGIS Online map Add > Add Layer from Web > A Tile Layer and use the URL you got from Mapbox.

Save the webmap and use it in Pro.

Hi Kory,

Thanks for the reply.  The above option you noted is how to add an existing MapBox map to either Pro or AGOL as an image tiled layer and not a vector tile layer.  I am trying to find out how I can directly stream in 3rd party vector tiles directly into Pro.  My use case is that I want to be able to style the data, etc in Pro but I need to access 3rd party vector tile servers outside of AGOL or Portal.  Thanks.


Cheers,
Blair

Thanks for the clarification, Blair.  Could you please update the Idea's title and description to make the requirement clear?  "My use case is that I want to be able to style the data, etc in Pro but I need to access 3rd party vector tile servers outside of AGOL or Portal."

Thank you. 

I'm sure you've already seen this, but maybe for others who stumble upon this thread: Design custom basemaps with the new ArcGIS Vector Tile Style Editor 

This integration would be very good to have!

Hi, I don't know if this fits with your needs but you can import MVT data with a script tool, here is the source from an example.  In my case the MVT data is on disk but it looks like the driver supports a service.  Note also in my case the tiles have the extension '.mvt' and not '.pbf' so you can edit that setting.

#  MVTImporter.py - Import mapBox vector tiles to GeoPackage
#  coding: utf-8
#  For ogr methods see: https://gdal.org/python/ and surf the osgeo.ogr module


import arcpy
import os
from osgeo import ogr

arcpy.env.overwriteOutput = True


#  Get zoom level folder
zoomFolder = arcpy.GetParameterAsText(0)


#  Copy each layer to a new GeoPackage
level = os.path.basename(zoomFolder)
outgpkgPath = os.path.join(zoomFolder,
                          'ZoomLevel{}.gpkg'.format(level))
srcName = 'ZoomLevel{}GPKG'.format(level)
mvtDriver = ogr.GetDriverByName('MVT')
mvtDriver.SetMetadataItem('TILE_EXTENSION','mvt')
mvtDataSource = mvtDriver.Open(zoomFolder)
gpkgDriver = ogr.GetDriverByName('GPKG')
gpkgDataSource=gpkgDriver.CreateDataSource(outgpkgPath)
for i in range(mvtDataSource.GetLayerCount()):
    name = mvtDataSource.GetLayerByIndex(i).GetName()
    arcpy.AddMessage('Copying layer {}'.format(name))
    gpkgDataSource.CopyLayer(mvtDataSource.GetLayer(name),
                             name,
                             ['OVERWRITE=YES'])
    gpkgDataSource.FlushCache()
    gpkgDataSource.SyncToDisk()
gpkgDataSource.Destroy()
mvtDataSource.Destroy()

#  Set output parameter
arcpy.SetParameter(1,outgpkgPath)
arcpy.AddMessage('Done')