From: Tom Hughes Date: Tue, 22 Oct 2019 19:33:45 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/2354' X-Git-Tag: live~2405 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/58e95f7ea46accda6359b187ce5936aad4ac5945?hp=18c5e1622577374cdd4535d2f06e9d51226ee974 Merge remote-tracking branch 'upstream/pull/2354' --- diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 49d162b1f..5c6e58170 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -284,7 +284,11 @@ OSM.Query = function (map) { function queryOverpass(lat, lng) { var latlng = L.latLng(lat, lng).wrap(), bounds = map.getBounds().wrap(), - bbox = bounds.getSouth() + "," + bounds.getWest() + "," + bounds.getNorth() + "," + bounds.getEast(), + precision = OSM.zoomPrecision(map.getZoom()), + bbox = bounds.getSouth().toFixed(precision) + "," + + bounds.getWest().toFixed(precision) + "," + + bounds.getNorth().toFixed(precision) + "," + + bounds.getEast().toFixed(precision), radius = 10 * Math.pow(1.5, 19 - map.getZoom()), around = "around:" + radius + "," + lat + "," + lng, nodes = "node(" + around + ")",