X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c8fb5ad24c5751bd2d43b86e4359381d200af066..6618cb9019687c8c2edf74698f84b385c0d9edd6:/app/assets/javascripts/index/export.js diff --git a/app/assets/javascripts/index/export.js b/app/assets/javascripts/index/export.js index 417dfabd3..47830f8be 100644 --- a/app/assets/javascripts/index/export.js +++ b/app/assets/javascripts/index/export.js @@ -150,12 +150,12 @@ function initializeExport(map) { } function setBounds(bounds) { - var toPrecision = zoomPrecision(map.getZoom()); + var precision = zoomPrecision(map.getZoom()); - $("#minlon").val(toPrecision(bounds.getWest())); - $("#minlat").val(toPrecision(bounds.getSouth())); - $("#maxlon").val(toPrecision(bounds.getEast())); - $("#maxlat").val(toPrecision(bounds.getNorth())); + $("#minlon").val(bounds.getWest().toFixed(precision)); + $("#minlat").val(bounds.getSouth().toFixed(precision)); + $("#maxlon").val(bounds.getEast().toFixed(precision)); + $("#maxlat").val(bounds.getNorth().toFixed(precision)); mapnikSizeChanged(); htmlUrlChanged();