StephanGeorg / staticmaps

A Node.js library for creating map images with markers, polylines, polygons and text.
MIT License
171 stars 50 forks source link

GeoJSON as input format #81

Open kuuup-at-work opened 1 year ago

kuuup-at-work commented 1 year ago

Hi.

It would be useful if we could input GeoJSON data without extracting coordinates. Styling information can be provided by the properties section so data could be used by staticmaps and other libs interchangeably.

StephanGeorg commented 1 year ago

My suggestion for this: To keep backward compatibility, keep the addFeature methods and add a new addGeoJSON method that then passes the data to the respective method.

leoalho commented 1 year ago

Hi, I got interested in implementing this and created an addGeoJSON method. I have made a pull request for it, #87. Please let me know what you think.