limit elevation lat/long decimal places to 7
This commit is contained in:
parent
6ef12fba6c
commit
5dcd47165c
2 changed files with 3 additions and 3 deletions
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue