Use appropriate precision for "Where am I?"
This commit is contained in:
parent
59d5b5fa6e
commit
0f799186ab
1 changed files with 4 additions and 1 deletions
|
@ -303,6 +303,9 @@ $(document).ready(function () {
|
||||||
|
|
||||||
$("#describe_location").on("click", function(e) {
|
$("#describe_location").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
OSM.route("/search?query=" + encodeURIComponent(map.getCenter().lat + "," + map.getCenter().lng));
|
var precision = zoomPrecision(map.getZoom());
|
||||||
|
OSM.route("/search?query=" + encodeURIComponent(
|
||||||
|
map.getCenter().lat.toFixed(precision) + "," +
|
||||||
|
map.getCenter().lng.toFixed(precision)));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue