-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vector Tile Layer Basemap Dropped During Template Creation #1255
Comments
Webmap 86ca7f552f1a49329fcb259201d6df54 contains Vector Tile Service basemap "Community Map" (273bf8d5c8ac400183fc24e109d20bcf). Because the VTS doesn't contain the typeKeyword "Vector Tile Style Editor", its style is excluded as specified in #46 (comment). |
@MikeTschudi, I think it is the correct logic that we are not templatizing it in this scenario as per #46. However, I don't think we should be changing the definition of the original basemap. I would expect the definition of the basemap in the template to be the same as it was in the original web map. The definition that it is changed to will result in a broken basemap in the deployed WebMap as we don't have any reference to any layers in the baseMap object.
|
@chris-fox, this makes sense; thank you. The current implementation discards any VectorTileLayers that don't have the "Vector Tile Style Editor" typeKeyword. Webmap 86ca7f552f1a49329fcb259201d6df54 has "baseMap": {
"baseMapLayers": [
{
"id": "18aa9f7c016-layer-12",
"title": "Community",
"itemId": "273bf8d5c8ac400183fc24e109d20bcf",
"layerType": "VectorTileLayer",
"effect": [
{
"type": "grayscale",
"amount": 0.7
}
],
"styleUrl": "https://www.arcgis.com/sharing/rest/content/items/273bf8d5c8ac400183fc24e109d20bcf/resources/styles/root.json"
}
],
"title": "Community Map"
}, Should we instead discard just the styleUrl if the typeKeyword is missing, thus handling the layer like other layers? "baseMap": {
"baseMapLayers": [
{
"id": "18aa9f7c016-layer-12",
"title": "Community",
"itemId": "273bf8d5c8ac400183fc24e109d20bcf",
"layerType": "VectorTileLayer",
"effect": [
{
"type": "grayscale",
"amount": 0.7
}
]
}
],
"title": "Community Map"
}, |
@MikeTschudi, we need to keep the styleUrl property otherwise the layer will fail to load. Basically we just want it to be identical to before and continue to point to the original item and url that was referenced in the web map. |
So we no longer need to check for the "Vector Tile Style Editor" typeKeyword? Push the layer as a dependency and templatize the URL to the style resource all the time? |
No, I am saying if you check the item and it doesn't have the typekeyword than you don't push the layer as a dependency or templatize the url. But you also shouldn't change anything about the original layer. The json definition of the basemap layer should be pushed to the template unchanged, no properties removed or modified. For example this is the json definition in the original basemap and the item id '273bf8d5c8ac400183fc24e109d20bcf' does not have the typeKeyword. "baseMap": {
"baseMapLayers": [
{
"id": "18aa9f7c016-layer-12",
"title": "Community",
"itemId": "273bf8d5c8ac400183fc24e109d20bcf",
"layerType": "VectorTileLayer",
"effect": [
{
"type": "grayscale",
"amount": 0.7
}
],
"styleUrl": "https://www.arcgis.com/sharing/rest/content/items/273bf8d5c8ac400183fc24e109d20bcf/resources/styles/root.json"
}
],
"title": "Community Map"
}, This is the json I would expect in the resulting template: "baseMap": {
"baseMapLayers": [
{
"id": "18aa9f7c016-layer-12",
"title": "Community",
"itemId": "273bf8d5c8ac400183fc24e109d20bcf",
"layerType": "VectorTileLayer",
"effect": [
{
"type": "grayscale",
"amount": 0.7
}
],
"styleUrl": "https://www.arcgis.com/sharing/rest/content/items/273bf8d5c8ac400183fc24e109d20bcf/resources/styles/root.json"
}
],
"title": "Community Map"
}, |
Got it--thank you. |
It appears that basemap with custom effects are getting dropped during template creation.
The item below was created from a map using a vector tile basemap with custom display properties. When created those, properties were lost.
https://localdeployment.maps.arcgis.com/home/item.html?id=52721adac6844466b027649d3a575e47
Original Basemap Code:

Code Copied into Solution Template:

This is could be related to #46
The text was updated successfully, but these errors were encountered: