Hey ther,
I have a Dash leaflet map displaying a GeoJSON of polygons ; I would like to give those polygons different colors according to one of their properties ; I tried to set up a function(feature) returning a specific style dict for every different property but it seems passing a function into the style option of my dl.GeoJSON causes layout loading to fail. Any idea how to achieve this ?
I think this is clear engouh not to provide code
Thanks for your help
Hello @DCTN54 , I’ve tried several times with docs from the plotly page, and I guess that what you 're looking for is around there. Check this out:
I think there isn’t necessary to set up a specific function, it only be sufficient to match the feature_id_key with the correct GeoJson dict field. What do you think?
Sorry if this is not what you’re looking for… maybe I didn’t understand your qx.
1 Like
Did you look at the example in the docs?
https://www.dash-leaflet.com/docs/geojson_tutorial#a-choropleth-map