Closed mmd-osm closed 8 years ago
Yes, that seems like a good idea. This is trivial to implement but will break the way MapQuery
works. Right now you would call it like
result = api.Get(MapQuery(bbox))
Because the /map
call is a different endpoint is actually a different endpoint, it may be confusing to define the wrapper like this. I propose either a static method:
map = overpass.Map(bbox)
or a new instance method:
map = api.Map(bbox)
Looking at how we have been designing the wrapper so far, I gravitate towards the latter solution.
It's interesting that I can't find any reference to the /map
call on the Overpass API wiki page on OSM...
Does anyone know if there is any more to it than http://overpass-api.de/api/map?bbox=min_lon,min_lat,max_lon,max_lat
?
According to the original commit, the idea was to provide a map call via Overpass API, which matches the OSM API method map.
Does anyone know if there is any more to it than http://overpass-api.de/api/map?bbox=min_lon,min_lat,max_lon,max_lat?
That should really be all. The main OSM site uses the same approach:
https://github.com/openstreetmap/openstreetmap-website/blob/36cbda3c80beac9496316389d4f082383ed4322a/app/assets/javascripts/index/export.js#L45-L48
To keep the map query in sync with the main
map
call on osm.org, I'd suggest to take a look at the original query, which is used by Overpass API to implement the map call: https://github.com/drolbr/Overpass-API/blob/master/src/cgi-bin/map#L27.As an alternative, the /api/map endpoint could be called instead of /api/interpreter, like on osm.org.