Limits the coordinate precision to 6 digits: ~ 0.1 meter max
This commit is contained in:
@@ -48,13 +48,13 @@ $( document ).ready(function() {
|
|||||||
mymap.on('click', function(e){
|
mymap.on('click', function(e){
|
||||||
poi_layer.unbindTooltip();
|
poi_layer.unbindTooltip();
|
||||||
poi_layer.setLatLng(e.latlng);
|
poi_layer.setLatLng(e.latlng);
|
||||||
$("#lat").val(e.latlng.lat);
|
$("#lat").val(e.latlng.lat.toFixed(6));
|
||||||
$("#lon").val(e.latlng.lng);
|
$("#lon").val(e.latlng.lng.toFixed(6));
|
||||||
})
|
})
|
||||||
poi_layer.on('move', function(e){
|
poi_layer.on('move', function(e){
|
||||||
poi_layer.unbindTooltip();
|
poi_layer.unbindTooltip();
|
||||||
$("#lat").val(e.latlng.lat);
|
$("#lat").val(e.latlng.lat.toFixed(6));
|
||||||
$("#lon").val(e.latlng.lng);
|
$("#lon").val(e.latlng.lng.toFixed(6));
|
||||||
})
|
})
|
||||||
|
|
||||||
var poiicon = L.icon({
|
var poiicon = L.icon({
|
||||||
|
|||||||
Reference in New Issue
Block a user