Problem: The Download style button does not appear in the vector tile layer item details page
ArcGIS Online provides the capability to update the style of a vector tile layer by downloading the style JSON from the item details of the vector tile layer, making edits to the downloaded .json file, and uploading the edited file back to the vector tile layer. However, when attempting to update the vector tile layer with the workflow described above, two issues may be encountered:
- The Download style button does not appear in the item details page of the tile layer; hence users are not able to download the style file to make edits.
- The Download style button disappears after the tile layer style is updated with a new .json file, and the updated layer's style is not reflected in the vector tile layer when viewed in the map viewer.
The following are possible causes of the issues:
- The layer name or field name of the vector tile layer contains unsupported characters. These characters include spaces, hyphens, brackets, and other special characters. The special characters contained in the layer name or field name of the vector tile layer cause the JSON to parse incorrectly and prevent the vector tile layer from rendering properly. In some cases, the vector tile layer is not displayed in the map viewer.
The image below is an example of a style JSON of a vector tile layer containing a special character (the angle bracket) in the layer name.
- The vector tile layer style is updated with an invalid JSON. For example, a closing or ending braces are missing from the JSON used to update the vector tile layer style.
Solution or Workaround
Depending on the cause of the issue, use one of the following solutions:
Remove the special characters from the layer name or field name of the vector tile layer
Special characters in the layer name or field name of the vector tile layer must be removed from the data before creating a vector tile package from the data and publishing to ArcGIS Online.
- In ArcMap or ArcGIS Pro, rename the layer or the field name of the data used to create the vector tile package, removing the special characters. The workflow to rename the layer or the field name are provided in the Related Information section below. The following document contains the list of characters to avoid in a layer or field name: FAQ: What characters should not be used in ArcGIS for field names and table names?
- Build a vector tile package using the data in Step 1, and upload to ArcGIS Online.
- In ArcGIS Online, update the uploaded vector tile layer style by referring to the workflow in the following document, ArcGIS Online: Update vector tile layer style. The Download style button appears in the item details page of the copied vector tile layer.
Validate the edited JSON before updating the vector tile layer style with the .json file
Validate the edited JSON using third party tools, such as a web-based JSON validator called 'JSON Lint', or a JSONViewer Notepad++ plugin prior to updating the vector tile layer style.
- ArcMap Help: Renaming a field
- ArcMap Help: Renaming a layer
- ArcGIS Pro Help: Alter Field
- ArcGIS Online Help: Publish hosted tile layers from files
- GeoNet: Adding Custom Style to Vector Tiles