Select to view content in your preferred language

Adding my own Hosted Vector Tile Layer to Vector Tile Style Editor?

483
3
Jump to solution
04-05-2024 05:05 PM
TimHayes3
Occasional Contributor

I am using the Vector Tile Style Editor in AGOL. I am able to choose an ESRI Basemap to add and then edit the layers in said basemap. But, I have a Hosted Vector Tile Layer I created and want to add this as a new layer on top of the ESRI Basemap in the Vector Tile Style Editor. Then I can edit this new layer along with the ESRI Basemap Layers. How can I do this? thank you.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Matthew_Muehlhauser
New Contributor III

You can have multiple sources in a vector tile style, however; you can't do this is the Vector Tile Style Editor. You would need to download both the ESRI JSON and your own JSON and then combine them. In general, this would be the workflow:

1. Create copies of the vector tile layers in ArcGIS Online and download both JSON files.

2. Rename the source (near the top of the JSON file) in either one or both json files and update the source name for each layer in the files to your new source name. 

3. Pick one of the JSON as your base (I would suggest the ESRI one) and add the other source to this one (near the top in "sources").

4. Add the layers from the other json to the "layers" in the base json. Note: in vector tile styles, layers at the bottom end up on top, so if you want your vector layers to be on top, you will want to place them below the ESRI ones.

5. Click "Update" in ArcGIS Online and drag and drop your new JSON file in to update the style.

6. Assuming you used the ESRI version as a base, you will now need to add any sprites or glyphs (fonts) to this new layer that were associated with your own vector tiles, since you can only have a single sprite and glyph source. You may need to download them from your vector tile map and then re-upload to this new vector tile. Be mindful of the naming of sprites, since this is how they are referenced in the vector tiles and they are changed when you download them. If you don't have any, then you are done and can skip this step.

ESRI "documentation" on the topic: Multiple vector tile sources—ArcGIS Pro | Documentation 

View solution in original post

3 Replies
Matthew_Muehlhauser
New Contributor III

You can have multiple sources in a vector tile style, however; you can't do this is the Vector Tile Style Editor. You would need to download both the ESRI JSON and your own JSON and then combine them. In general, this would be the workflow:

1. Create copies of the vector tile layers in ArcGIS Online and download both JSON files.

2. Rename the source (near the top of the JSON file) in either one or both json files and update the source name for each layer in the files to your new source name. 

3. Pick one of the JSON as your base (I would suggest the ESRI one) and add the other source to this one (near the top in "sources").

4. Add the layers from the other json to the "layers" in the base json. Note: in vector tile styles, layers at the bottom end up on top, so if you want your vector layers to be on top, you will want to place them below the ESRI ones.

5. Click "Update" in ArcGIS Online and drag and drop your new JSON file in to update the style.

6. Assuming you used the ESRI version as a base, you will now need to add any sprites or glyphs (fonts) to this new layer that were associated with your own vector tiles, since you can only have a single sprite and glyph source. You may need to download them from your vector tile map and then re-upload to this new vector tile. Be mindful of the naming of sprites, since this is how they are referenced in the vector tiles and they are changed when you download them. If you don't have any, then you are done and can skip this step.

ESRI "documentation" on the topic: Multiple vector tile sources—ArcGIS Pro | Documentation 

TimHayes3
Occasional Contributor

Thank you @Matthew_Muehlhauser . Do you if I can still use pop ups on my own vector tile layers combined as you mentioned above?

0 Kudos
Matthew_Muehlhauser
New Contributor III

Vector Tiles don't support Pop-ups. It's meant to be used as a basemap that isn't interacted with. If you want popups, then you could create a map that uses the ESRI Vector Tiles with your style as a basemap and then layer the hosted feature class on top of that with the popups enabled on that layer.