jperelli / osm-static-maps

Openstreetmap static maps is a nodejs lib, CLI and server open source inspired on google static map service
http://osm-static-maps.herokuapp.com/
GNU General Public License v2.0
160 stars 52 forks source link

GeoJSON fill color #16

Closed taalas closed 4 years ago

taalas commented 4 years ago

Is it possible to adjust the fill color used to display geojson polygons?

jperelli commented 4 years ago

@taalas That's actually a good feature, I'll work on that, probably on this weekend

taalas commented 4 years ago

Awesome! It would be great if the fill color could be evaluated per Feature (even in a FeatureCollection). Probably by allowing a property in Properties?

jperelli commented 4 years ago

@taalas done, I added a new global style option and per geojson feature pathOptions option that expects a path options object (see https://leafletjs.com/reference-1.6.0.html#path-option) for styling

Published in npm as v3.8.0

Let me know if that works!