Reduce user location to be between -180 and 180 degrees
This commit is contained in:
parent
64bf69fa19
commit
7db1180506
1 changed files with 4 additions and 3 deletions
|
@ -24,11 +24,12 @@ $(document).ready(function () {
|
|||
map.on("click", function (e) {
|
||||
if ($('#updatehome').is(':checked')) {
|
||||
var zoom = map.getZoom(),
|
||||
toZoom = zoomPrecision(zoom);
|
||||
toZoom = zoomPrecision(zoom),
|
||||
location = e.latlng.wrap();
|
||||
|
||||
$('#homerow').removeClass();
|
||||
$('#home_lat').val(toZoom(e.latlng.lat));
|
||||
$('#home_lon').val(toZoom(e.latlng.lng));
|
||||
$('#home_lat').val(toZoom(location.lat));
|
||||
$('#home_lon').val(toZoom(location.lng));
|
||||
|
||||
marker.setLatLng(e.latlng);
|
||||
marker.addTo(map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue