diff --git a/public/resources/elevation-control.js b/public/resources/elevation-control.js index a1fda61b1..8821eaeec 100644 --- a/public/resources/elevation-control.js +++ b/public/resources/elevation-control.js @@ -18,7 +18,7 @@ class ElevationInfoControl { map.on('click', (e) => { var url = this.url; - var coord = {"z": Math.floor(map.getZoom()), "x": e.lngLat["lng"], "y": e.lngLat["lat"]}; + var coord = {"z": Math.floor(map.getZoom()), "x": e.lngLat["lng"].toFixed(7), "y": e.lngLat["lat"].toFixed(7)}; for(var key in coord) { url = url.replace(new RegExp('{'+ key +'}','g'), coord[key]); } diff --git a/src/serve_data.js b/src/serve_data.js index 6369aa21d..5493ff2c7 100644 --- a/src/serve_data.js +++ b/src/serve_data.js @@ -259,8 +259,8 @@ export const serve_data = { let data = fetchTile.data; var param = { - long: bbox[0], - lat: bbox[1], + long: bbox[0].toFixed(7), + lat: bbox[1].toFixed(7), encoding, format, tile_size: TILE_SIZE,