To update the style for a hosted vector tile layer, you must first save a copy of the vector tile layer. You must save a copy regardless of whether or not you own the layer. You can then download the style from the item details of the copied layer, edit the style, and upload it to your copy. Any web maps or apps you create using the new vector tile layer will use the updated style but still reference the tiles of the original vector tile layer. With this approach, you can create multiple layers with different styles that reference the vector tiles in the original layer.
Follow these steps to save a copy of a vector tile layer in Map Viewer so you can download, edit, and upload the vector tile layer's style. You must have privileges to create content to save a copy of the layer.
- Sign in to your portal.
- Add the vector tile layer containing the style you want to change to Map Viewer.
- Click More Options under the vector tile layer and click Copy.
A copy of the layer is added to the map contents.
- You must save this copy as a layer. Click More Options for the copy you created and click Save Layer.
The Create Item window opens.
- Specify a Title, Tags, Summary, and folder location for your new layer and click Create Item.
- From the content page, click the My Content tab, find the layer you saved, and click the name of the layer to view its item page.
- To download the style for this layer, click Open > Download style.
This downloads a root.json file to your local machine. You can rename the file if you like.
- Open the root.json file in a JSON editor and edit it to update the style.
Vector tile layers are built using the Mapbox vector tile specification. For information on how to style data in these vector tiles, see Mapbox GL Style Reference.
- Once you have saved your style changes to the file, update your copy of the vector tile layer with the new style.
- Sign in to your organization and open the item details of your copy of the vector tile layer.
- Click Update.
The Update Style File window opens.
- Choose your edited .json file and click Update Style File.
The style for your copy of the vector tile layer is updated.
- To see your changes, click Open > Add layer to new map on the layer's item details.
- To continue editing the style, you can make further changes to the .json file and update your copy of the vector tile layer.