-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Feature request: is it possible to change the style after creating a layer? I'd like to show a map and then have a drop down of feature names, and then update the layer to colour by that feature, possibly with a different colour scale.
At present I don't think it can be easily done because the colour mapping info is stored in opts which has the scope of the L.choropleth constructor - changing mylayer.options and forcing a style update with mylayer.setStyle(mylayer.options.style) doesn't work. I can't actually see how a style function can get anything from the layer options, but my JS skills are poor, especially understanding scope in JS...
Metadata
Metadata
Assignees
Labels
No labels