umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.05k stars 213 forks source link

Enable CORS in DataLayerView? #1910

Open hriebl opened 1 week ago

hriebl commented 1 week ago

Hey all,

would it make sense to enable CORS in the DataLayerView, just as in the MapView? This would facilitate the use of GeoJSON data from uMap in other web apps.

By the way, thank you for this great project!

yohanboniface commented 6 days ago

Makes sense, but I'd wait for:

So we don't break external usage by mistake.

almet commented 6 days ago

Thanks for your issue :-)

The frontier between public and internal data is a bit fuzzy as it is right now. Exposing the internal data to the public can be misleading, so I would too advocate for having a REST API (#175).

hriebl commented 5 days ago

Alright, thank you! I was hoping for a quicker solution by just enabling CORS for the existing DataLayerView, but I agree that from a strategic point of view, a general, public REST API should come first. And of course, although enabling CORS for the DataLayerView probably wouldn't do a lot of harm, it might look like an invitation to use it as a stable, public endpoint to some (me, for example :stuck_out_tongue:).

davidbgk commented 5 days ago

Let's not forget that we need to switch to UUID first 😅

905