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.19k stars 226 forks source link

Difficulty in loading Overpass to uMap #786

Closed mapbeks closed 1 month ago

mapbeks commented 4 years ago

I followed doing this link and it seems that it wasnt able to show the data from OSM.

http://www.mappa-mercia.org/2014/09/creating-an-always-up-to-date-map.html

Other than that, I also tried copy-pasting the same link shown and followed the data type to osm and ticking dynamic.

These are the links I tried using. on my map to pull out the overpass query Im trying to pull out schools

http://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(node["amenity"="school”]({south},{west},{north},{east});way["amenity"="school”]({south},{west},{north},{east});relation["amenity"="school”]({south},{west},{north},{east}););out;>;out skel qt;

Hopefully you can help me.

Lastly, I. was trying to explore umap if I can only load overpass turbo bounded only in a specific bbox but would be nice to find out first how to load all the needed data then limiting it to a specific bbox.

Thanks in advance

Binnette commented 4 years ago

Hi, can you please add a link to your umap project here? This way, i can test it easily.

jamescr commented 4 years ago

I followed the same link and also was unable to show data from OSM. The overpass query was: http://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(node["emergency"="fire_hydrant"]({south},{west},{north},{east}););out body;>;out skel qt;

But I found here that the problem was that I was not using the https version of the link. I changed the link to https and the umap works with remote data. My query now is https://overpass-api.de/api/interpreter?data=[out:json][timeout:25];(node["emergency"="fire_hydrant"]({south},{west},{north},{east}););out body;>;out skel qt;

Link to the umap: https://umap.openstreetmap.fr/es/map/hidrantes-de-alajuela_489052#16/10.0163/-84.2186.

carlbacker commented 3 years ago

Hi @mapbeks , I solved this the same way as @jamescr so I hope it worked for you too.

Custom bbox is also easily done in overpass, but most often the same result is easier with geoname coded areas such as amenity=post_box IN "Rio de Janeiro" or amenity=library IN Kenya through the wizard.

But adding custom bbox values directly to query parameters looks like this (comma-separated point-decimal degrees in order of: S lat, W lon, N lat, E lon ) :

[out:json][timeout:25][bbox:50.6,7.0,50.8,7.3];

I have tried a uMap style URL export with this in a query, as a dynamic layer in a testing uMap and it worked perfectly.

There are other ways of adding the bbox in an overpass URL, such as a separate variable in the URL call, which is more programmable. More details in Overpass wiki.

Sidenote: Since you are working with school data, which is often areas/polygons that uMap doesn't always handle well in low zoom levels and features like cluster and icons, have a look at showing polygons as centroid nodes instead.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.