javascript - Changing the style of each feature in a Leaflet GeoJSON layer -
i have been studying leaflet chloropleth example.
in leaflet application, have jquery dropdown that, when selected, fires function takes name of state argument. want use state name update chloropleth map.
what pattern changing style of leaflet geojson layer? should recreate layer created l.geojson()
second time? seems though layers drawing on top of each other approach.
i can provide fiddle if needed.
here's an example of changing choropleth classify on different properties - trick call setstyle
again different values.
Comments
Post a Comment