camptocamp / inkmap

A library for generating high-quality, printable maps on the browser.
Other
86 stars 17 forks source link

Add GeoJSON #42

Closed nboisteault closed 3 years ago

nboisteault commented 3 years ago

Add a spec with OSM and GeoJSON layers. Add createLayerGeoJSON() function.

jahow commented 3 years ago

Thanks a lot for your contribution! This is highly appreciated. I will give it a review today.

nboisteault commented 3 years ago

Many thanks for your review and explanations, I have learned things! I'll add a test and a better GeoJSON example a little bit later.

nboisteault commented 3 years ago

Hi @jahow , everything should be ok (I hope so :))

nboisteault commented 3 years ago

Sorry, forgot this one ;) Done now !

nboisteault commented 3 years ago

Many thanks @jahow for your help!

jahow commented 3 years ago

Many thanks @jahow for your help!

No problem! Let me know if/when you think you can contribute custom styling to geojson layers, then I think this can warrant a new release!

nboisteault commented 3 years ago

I'll contribute to custom styling in one or two weeks. Have you think about the style part of the spec yet?

jahow commented 3 years ago

Sure, styling vector data is already possible with WFS, see: https://github.com/camptocamp/inkmap/blob/88b178d4909b7069ded9db4a31bfc5dcd3a8647a/src/printer/layers.js#L419-L425

I think we should find a way to put that in common with the geojson layer. Also note that this relies on https://github.com/geostyler/geostyler-openlayers-parser which (last I checked) had some limitations, e.g. no support for dashed lines.