diff --git a/cyan_angular/src/app/marker-map/marker-map.component.ts b/cyan_angular/src/app/marker-map/marker-map.component.ts index 04693cb..6e36f98 100644 --- a/cyan_angular/src/app/marker-map/marker-map.component.ts +++ b/cyan_angular/src/app/marker-map/marker-map.component.ts @@ -104,24 +104,24 @@ export class MarkerMapComponent implements OnInit { // console.log("mouseup event") }); - this.mapService.getMap().on('zoomend', event => { + // this.mapService.getMap().on('zoomend', event => { - this.zoomLevel = event.target._zoom; + // this.zoomLevel = event.target._zoom; - // let wbCheckbox = document.getElementById('leaflet-wb-layer-control') as HTMLInputElement; + // // let wbCheckbox = document.getElementById('leaflet-wb-layer-control') as HTMLInputElement; - let path = this.ngLocation.path(); + // let path = this.ngLocation.path(); - // if (this.zoomLevel >= this.wbLayerZoomThreshold && wbCheckbox.checked === true) { - if (this.zoomLevel >= this.wbLayerZoomThreshold && !path.includes("wbstats")) { - // NOTE: does not add duplicates, which is nice - this.mapService.waterbodyDataLayer.addTo(this.mapService.getMap()); - } - else { - this.mapService.waterbodyDataLayer.removeFrom(this.mapService.getMap()); - } + // // if (this.zoomLevel >= this.wbLayerZoomThreshold && wbCheckbox.checked === true) { + // if (this.zoomLevel >= this.wbLayerZoomThreshold && !path.includes("wbstats")) { + // // NOTE: does not add duplicates, which is nice + // this.mapService.waterbodyDataLayer.addTo(this.mapService.getMap()); + // } + // else { + // this.mapService.waterbodyDataLayer.removeFrom(this.mapService.getMap()); + // } - }); + // }); } @@ -326,7 +326,12 @@ export class MarkerMapComponent implements OnInit { let dataDate = '01/01/2018'; let source = 'OLCI'; + console.log("Creating location."); + let location = this.locationService.createLocation(name, lat, lng, cellCon, maxCellCon, cellChange, dataDate, source); + + console.log("Location: ", location) + map.setView(e.latlng, 12); let m = this.mapService.addMarker(location); m.fireEvent('click');