Add comment describing the overpass queries we use
This commit is contained in:
parent
03f3fd5954
commit
2e05669a22
1 changed files with 23 additions and 0 deletions
|
@ -209,6 +209,29 @@ OSM.Query = function(map) {
|
|||
}));
|
||||
}
|
||||
|
||||
/*
|
||||
* To find nearby objects we ask overpass for the union of the
|
||||
* following sets:
|
||||
*
|
||||
* node(around:<radius>,<lat>,lng>)
|
||||
* way(around:<radius>,<lat>,lng>)
|
||||
* node(w)
|
||||
* relation(around:<radius>,<lat>,lng>)
|
||||
*
|
||||
* to find enclosing objects we first find all the enclosing areas:
|
||||
*
|
||||
* is_in(<lat>,<lng>)->.a
|
||||
*
|
||||
* and then return the union of the following sets:
|
||||
*
|
||||
* relation(pivot.a)
|
||||
* way(pivot.a)
|
||||
* node(w)
|
||||
*
|
||||
* In order to avoid overly large responses we don't currently
|
||||
* attempt to complete any relations and instead just show those
|
||||
* ways and nodes which are returned for other reasons.
|
||||
*/
|
||||
function queryOverpass(lat, lng) {
|
||||
var latlng = L.latLng(lat, lng),
|
||||
radius = 10 * Math.pow(1.5, 19 - map.getZoom()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue