Hide insignificant trailing zeros in coordinates

This commit is contained in:
Léo Serre 2021-05-19 23:11:53 +02:00
parent 4816d14faa
commit 1c2e1b6fcb
1 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,8 @@ $( document ).ready(function() {
})
poi_layer.on('move', function(e){
poi_layer.unbindTooltip();
$("#lat").val(e.latlng.lat.toFixed(6));
$("#lon").val(e.latlng.lng.toFixed(6));
$("#lat").val(+e.latlng.lat.toFixed(6));
$("#lon").val(+e.latlng.lng.toFixed(6));
$("#elevation_icon").show();
})
$("#lat,#lon").change(function() { // If the user changes the lat/lon input values manualy