Select to view content in your preferred language

How to update Vector Tile Layer?

14003
21
Jump to solution
07-08-2016 11:19 AM
KateNewell1
Frequent Contributor

I have created a map for vector tiling in ArcGIS Pro using the directions here.

I was able to create a vector tile package quite easily in ArcPro, and upload the Vector Tile Package to ArcGIS Online, which also created the Vector Tile Layer at the time of upload.  It all works great!

I did notice that I had forgotten to label a feature class and wanted to rearrange a few layers.  I made the changes in the ArcPro project, re-ran the "Create Vector Tile Package" in ArcPro and "Updated" the revised Vector Tile Package in ArcGIS Online.  Everything was successful, except I do not see any way to update/re-publish the Vector Tile Layer that was created when I first uploaded the Vector Tile Package in ArcGIS Online.

I don't really want to delete the Vector Tile Package/Vector Tile Layer and re-upload everything, as this will consume additional credits.  Seems like there should be a way to update the Vector Tiles when you update the Vector Package? Am I missing something?

-Kate

1 Solution

Accepted Solutions
KellyGerrow
Esri Alum

Thanks to Patrick Demer‌ for updating this script so that it works for vector tile packages: 

https://cloudygis.maps.arcgis.com/home/item.html?id=e94507f5477b4a2c9ecbd1b198e0fad2 

View solution in original post

21 Replies
KellyGerrow
Esri Alum

HI Kate,

There isn't an overwrite option available for Vector tile layers currently. To overwrite your layer, delete the already existing service, and the publish button will become enabled on your vector tile package item. You can then publish the item.

The publishing process doesn't consume credits, so you won't be charged for republishing the data. As the tiles were generated on your machine before uploading the vector tile package, you won't be charged for tile generation. If you upload a vector tile package with more data (increased amount of tiles), your resulting vector tile service may incur more storage charges, but this wouldn't be any different in the case of overwriting the service.

Let me know if you have any questions,

Kelly

JoshZeeb1
Occasional Contributor

Kelly,

After you delete and republish the Tile Layer, with the same name as before, will you have to re-add the layer to each map that the layer was originally on?

Thanks,

Josh

0 Kudos
MichaelVolz
Esteemed Contributor

Kelly:

Do you have an answer to Josh's questions?

0 Kudos
KellyGerrow
Esri Alum

Hi Michael, 

You don't need to re-add the layer to the web map if the service name is the same. In the web map, we do record the item id, which will change if you republish the service, so there will be a mismatch in item IDs. Currently, this will have no effect on how the layer draws in the webmap, but is something to be aware of if you are looking at the webmap JSON.

Additionally, if you want to explore an automation option, you can look into trying to modify this script that updates tiled map services from tile packages which prevents the need to delete the service and republish: http://cloudygis.maps.arcgis.com/home/item.html?id=d829e15ca7d840f29b1a1d8d2e8b7ac7 

The same concept may work for VTPKs, but I haven't tested it out yet.

-Kelly

KellyGerrow
Esri Alum

Thanks to Patrick Demer‌ for updating this script so that it works for vector tile packages: 

https://cloudygis.maps.arcgis.com/home/item.html?id=e94507f5477b4a2c9ecbd1b198e0fad2 

HéctorMeléndez
Esri Contributor

Do you know if it's possible to make this script work in ArcGIS Enterprise 10.5.1? I've been trying to test it in Portal but can't find the equivalent update tile rest endpoint for the vector tile map service.

"https://<GIS Server URL>/webadaptor/rest/admin/services/host/<MyService>.VectorTileServer/update"

0 Kudos
GyaneshGounder
Emerging Contributor

Hi Kelly 

I am having the same issues as Hector. I can't seem to find the equivalent to 

"https://<GIS Server URL>/webadaptor/rest/admin/services/host/<MyService>.VectorTileServer/update" 

Please advise, will we have to try at 10.6 or 10.6.1 ??

Kind Regards

Gyanesh

0 Kudos
AmberKelly
Regular Contributor

Hi Kelly,

Im getting an error when i try to run the script. 

File "<string>", line 101
print update
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(update)?

Im pretty amateurish with python so please forgive me if its something obvious. 

Can you assist?

Cheers

Amber 

KellyGerrow
Esri Alum

The script is written in python 2.7. You will either need to run the script in an old version of python, or update the print statements to a newer version.

0 Kudos