280,17 → 280,10 |
}; |
|
Geoloc.prototype.handleMarkerEvents = function() { |
if(this.map) { |
const lthis = this; |
// move marker on click |
$(this.map).off('click').on('click', function(evt) { |
lthis.handleNewLocation(evt.latlng); |
}); |
// move marker on drag |
$(this.map.marker).off('dragend').on('dragend', function() { |
lthis.handleNewLocation(lthis.map.marker.getLatLng()); |
}); |
} |
// move marker on click |
$(this.map).off('click').on('click', evt => this.handleNewLocation(evt.latlng).bind(this)); |
// move marker on drag |
$(this.map.marker).off('dragend').on('dragend', () => this.handleNewLocation(this.map.marker.getLatLng()).bind(this)); |
}; |
|
Geoloc.prototype.handlePolylineEvents = function(requiresNewEditDrawControl = true) { |