Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an api for automatic export #78

Open
yohanboniface opened this issue May 26, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@yohanboniface
Copy link
Member

commented May 26, 2014

Originally reported by: BitBucket: guillaumeallegre, GitHub: guillaumeallegre


I would like to automatically download the geojson export of a map,
eg. on a daily basis.
This is to track locally the editions of an open map (and perhaps manually revert to a previous version in case of vandalism).
A very simple API would be useful for this.


@yohanboniface

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2014

Original comment by Yohan Boniface (BitBucket: yohanboniface, GitHub: yohanboniface):


There is yet a sort of API, even if it's not public :)

Say you want to download data of this map: http://umap.openstreetmap.fr/en/map/prestataires-professionnels-osm-en-france_10299#6/46.324/6.306

You have a geojson entry point: http://umap.openstreetmap.fr/en/map/10299/geojson/ which will return a geojson.

In this geojson, you can look for the datalayers key to get all the layers, and then request them using the datalayer_view template you can find in the urls key.

You may need to authenticate, according to the map settings. This is not managed by the current entry points, so let's say for now you only want public maps ;)

Nothing official here, but I promise to ping you if something change ;)

Hope it's usable enough for you!

@yohanboniface

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2014

Original comment by BitBucket: guillaumeallegre, GitHub: guillaumeallegre:


Yeah, thanks, it'll do the job.

If one day somehow noninteractive authentication is possible, let us know!
Thanks again.

@almereyda

This comment has been minimized.

Copy link

commented Mar 13, 2016

Please note we just ran into #174 trying to export as much raw data from uMap as possible. It also appeared the mime-type for the geojson/ endpoint is not properly set; a browser tries to download a geojson.html instead of map#.geojson.

In this geojson, you can look for the datalayers key to get all the layers, and then request them using the datalayer_view template you can find in the urls key.

Yes, this could be more openly documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.