0

I am adding two GeoJSON polyline layers to a leaflet window in a dash app using callbacks like this:

dl.Map(children=[dl.TileLayer(), dl.GeoJSON(id="geojson1"), dl.GeoJSON(id="geojson2")])

How do I change the color of the second GeoJSON polyline to yellow?

1 Answer 1

0

You can pass the color inside the options parameter, inside a style dict, like this

dl.Map(children=[dl.TileLayer(), dl.GeoJSON(id="geojson1"), dl.GeoJSON(options={"style":{"color":"yellow"}}, id="geojson2")])

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.