Re: How to update Vector Tile Layer, keeping the itemID

3692
8
10-16-2018 09:59 AM
JeffBaker2
New Contributor III

Hi Kelly,

Can you help me sort out the irony here?  We are trying to figure a way to overwrite vector tiles while maintaining the item id.  We are using Portal, but so far it seems the only option is to create a new vector tile package, but this leads to a new item id which are not recognized in existing web maps.  However, ESRI has an awesome collection of vector basemaps available that are maintained regularly--how is ESRI keeping their basemaps current without creating new item id's?  (Or how is this handled otherwise?)  Thanks,

-Jeff

0 Kudos
8 Replies
RichardPoche
New Contributor II

Jeff, this may not be an esri supported approach, but worked for me as I could not find a good solution to update several features in my vector basemap without recreating the service. Make sure everything is the same with the level of detail and layers, etc. 

You can rename the new tile package vtpk extension as zip and extract the contents. 

You then browse to the location of the vector tiles in my case: 

\\gisserver\c\arcgisserver\directories\arcgiscache\VectorCache\Hosted\VectorBaseMap\VectorTileServer\tile

and replace the L0* folders with the ones you unzipped and refresh the map view. Hopefully it works for you. 

-Richard

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Jeff,

Great observation. You are right in that Esri is able to update a vector tile service while maintaining the Item ID. This functionality is different in ArcGIS Enterprise than in the scripts in the last post, so I have branched this to make this specific solution more easier to find for others.

If you are using ArcGIS Enterprise 10.6.1 or above, there is functionality called Replace Layer. You can do this through on the item page. http://enterprise.arcgis.com/en/portal/latest/use/manage-hosted-tile-layers.htm#ESRI_SECTION1_CF8695... 

(Please note this is not available with ArcGIS Online currently Oct. 2018)

Additionally you can make this change programmatically using the Python API:

arcgis.gis module — arcgis 1.5.0 documentation 

OR explore this option through the REST API:

https://developers.arcgis.com/rest/users-groups-and-items/replace-service.htm

Let me know if you have questions or if this helps with your workflow.

ArcGIS Enterprise

-Kelly

0 Kudos
deleted-user-uob-CFJkiST8
New Contributor II

Your first link does not work.  I do not see anything on the item page related to Replace Layer.  And its not available in ArcGIS Online?  If that's true, what item page are you referring to?  

The irony is very real when you are looking to update and maintain your own base maps.  I can't quite understand why vector tiles get pushed so hard, when their isn't a streamlined approach to updating base maps. 

deleted-user-8TJ6jZDO1Rfr
New Contributor III

Took the words out of my mouth. 

KellyGerrow
Esri Frequent Contributor

Hi,

The links seem to work for me. Can you check again? This workflow is only available with through the UI with ArcGIS Enterprise.

The REST API calls for replace service is available with ArcGIS Enterprise and ArcGIS Online:

Replace Service—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers 

This would be the recommended workflow for performing this swap in ArcGIS Online. The addition of this workflow for the UI of ArcGIS Online is planned for a future release of ArcGIS Online.

Thanks,

Kelly

NR_-_MorganVoss__GISS_
New Contributor

I realize this a newer feature and I hope I'm missing something, but as far as I've experimented with replacing VTPKs, it is not a seamless workflow for the Collector users. 

We have several layers in our various Collector apps based on SDE read-only type services we're moving to VTPK format, but they would ideally be updated once a month to reflect new data collection. While experimenting with the replace web layer functionality to ideally automate this on a task scheduler, I have not been able to replace the VTPKs and have them successfully show up in Collector without downloading a new offline area. Meaning that when I sync my previously downloaded offline area, the updated VTPK that has replaced the old one should be there, but it is not, which interrupts the whole uninterrupted workflow pitch. However, the replaced VTPK is there if I download a new offline area. Am I missing some step that is crucial to the uninterrupted workflow part? Or is it a portal thing? Any help or insight into replacing/updating VTPKs without having to download new offline areas to reflect updates would be very much appreciated. 

Thanks!

0 Kudos
MarkoPolo
New Contributor II

With AGS Portal 10.5+, can you use the following REST URL to update an existing vector tile layer using a vector tile package that is generated via ArcGIS Pro?

E.g. 

1. Create a map and publish a vector tile service

2. Find the service in portal and go to the following end point

https://[host]/arcgis/sharing/rest/content/users/[username]/items/[itemId]/update

3. Change the map, use the create title package geoprocessing service to create a new vtpk file

4. Upload the vtpk using the File To Upload of https://[host]/arcgis/sharing/rest/content/users/[username]/items/[itemId]/update

@esri

Does this work?

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Marko,

Are you trying to update the vector tile layer from the vector tile package or change the service url of an existing vector tile layer? 

The rest endpoint mentioned above will not update an item with a new vector tile package. 

Top update a vector tile layer, I would recommend publishing a new layer, and then using the replace logic to swap out the actual url.

I believe that you need to be at Enterprise v. 10.6, but you could check to see if the endpoint is available in 10.5.1

-Kelly

0 Kudos