From 5b2c740a2e828f3ac1a5d32fb31adbed12775d21 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 26 Apr 2019 16:13:38 -0400 Subject: [PATCH] Update the min and max variables when moving markers Need to update these when moving the bound markers. --- views/admin/management/index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/views/admin/management/index.html b/views/admin/management/index.html index 39cbee46..2f321367 100755 --- a/views/admin/management/index.html +++ b/views/admin/management/index.html @@ -811,6 +811,7 @@ var tMarker = event.target; var position = tMarker.getLatLng(); console.log( 'position', position ); + // update latMin tMarker.setLatLng(new L.LatLng(position.lat, position.lng),{ draggable:'true' }); glmRec.removeFrom(leafletMap); @@ -821,6 +822,8 @@ $('#glmBoundsLatMin').val(position.lat.toFixed(6)); $('#glmBoundsLonMin').val(position.lng.toFixed(6)); + latMin = $('#glmBoundsLatMin').val(); + lonMin = $('#glmBoundsLonMin').val(); }); var neMarker = L.marker([latMax, lonMax], { draggable: true @@ -839,6 +842,8 @@ $('#glmBoundsLatMax').val(position.lat.toFixed(6)); $('#glmBoundsLonMax').val(position.lng.toFixed(6)); + latMax = $('#glmBoundsLatMax').val(); + lonMax = $('#glmBoundsLonMax').val(); }); } -- 2.17.1