Update the min and max variables when moving markers
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 26 Apr 2019 20:13:38 +0000 (16:13 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 26 Apr 2019 20:13:38 +0000 (16:13 -0400)
Need to update these when moving the bound markers.

views/admin/management/index.html

index 39cbee4..2f32136 100755 (executable)
                     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);
 
                     $('#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
 
                     $('#glmBoundsLatMax').val(position.lat.toFixed(6));
                     $('#glmBoundsLonMax').val(position.lng.toFixed(6));
+                    latMax = $('#glmBoundsLatMax').val();
+                    lonMax = $('#glmBoundsLonMax').val();
                 });
 
             }