-
I've got a mvt dataset that has an attribute with a set of possible options. I'd like to change the colour of the linework based on the value of the attribute. I've tried doing this with the MapboxVectorTileCatalogItem json "style" property, but it just displays everything as black. It seems protomaps-leaflet does not support all of the options of the mapbox style spec, and in recent versions they have completely removed the style option: protomaps/protomaps-leaflet#55. I wanted to see if anyone in the community has another way to do conditional styling with mapbox vector tiles. Next step would be to split my dataset up based on attribute, but I'd like to avoid this if possible.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @aclel Maybe you could try defining multiple layers using As for upgrading to newer version of protomaps-leaflet, we are working on adding the deprecated styling module to Terria. |
Beta Was this translation helpful? Give feedback.
Hi @aclel
Maybe you could try defining multiple layers using
filter
and setting a single paint rule for each one of them.eg: https://tiles.arcgis.com/tiles/GB33F62SbDxJjwEL/arcgis/rest/services/Vicmap_Vegetation_Tree_Density/VectorTileServer/resources/styles/root.json?f=pjson
As for upgrading to newer version of protomaps-leaflet, we are working on adding the deprecated styling module to Terria.