Fixed measurement enabled tool

This commit is contained in:
Zakary Timson 2019-09-04 07:41:31 -04:00
parent a20dc25f71
commit 088777d742

View File

@ -226,7 +226,6 @@ export class MapComponent implements OnDestroy, OnInit {
let lastPoint;
this.sub = this.map.click.pipe(skip(1), finalize(() => this.map.delete(lastPoint))).subscribe(e => {
if (lastPoint) {
menuItem.enabled = false;
let measurement = {latlng: {lat: lastPoint.getLatLng().lat, lng: lastPoint.getLatLng().lng}, latlng2: e.latlng};
this.syncService.addMeasurement(measurement);
this.map.delete(lastPoint);