Update user location setting for zoomPrecision change
This commit is contained in:
parent
f9d714dfd3
commit
58eb17cb63
1 changed files with 3 additions and 3 deletions
|
@ -24,12 +24,12 @@ $(document).ready(function () {
|
|||
map.on("click", function (e) {
|
||||
if ($('#updatehome').is(':checked')) {
|
||||
var zoom = map.getZoom(),
|
||||
toZoom = zoomPrecision(zoom),
|
||||
precision = zoomPrecision(zoom),
|
||||
location = e.latlng.wrap();
|
||||
|
||||
$('#homerow').removeClass();
|
||||
$('#home_lat').val(toZoom(location.lat));
|
||||
$('#home_lon').val(toZoom(location.lng));
|
||||
$('#home_lat').val(location.lat.toFixed(precision));
|
||||
$('#home_lon').val(location.lng.toFixed(precision));
|
||||
|
||||
marker.setLatLng(e.latlng);
|
||||
marker.addTo(map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue