Closed diehl closed 4 months ago
Hi Chris,
im maplibre you use data-driven styling like this:
every_person_in_manhattan_circles = Layer(
type=LayerType.CIRCLE,
id=LAYER_ID,
source=every_person_in_manhattan_source,
paint={
"circle-color": ["match", ["get", "sex"], 1, MALE_COLOR, FEMALE_COLOR],
"circle-radius": CIRCLE_RADIUS,
},
)
See this examples:
And here
Brilliant - thank you for the pointers @crazycapivara !
Hi Stefan,
Building on our original discussion on interleaving data and basemap layers, I have a need to insert a vector tile layer into a basemap and set the fill color as a function of attributes attached to the geometries. In this scenario, I will typically have no more than 10 distinct colors defined that correspond to different attribute settings. In DeckGL, I would accomplish this with an MVTLayer and I think I know how I might set the color as a function of the attributes. I'm wondering if there's a more elegant way of doing this with PMTiles? Hopefully this question makes sense.