How do I set the fillcolor of polygons in Leaflet.js dynamically?
You can change the fill color of a polygon with the setStyle
method (inherited from Path).
polygon.setStyle({fillColor: '#0000FF'});
If you're having difficulty getting the geojson displayed properly you might take a look at the Leaflet GeoJSON docs.