Added some layers
This commit is contained in:
		@@ -3,9 +3,9 @@ import {PhysicsService} from "../../services/physics.service";
 | 
			
		||||
import {filter, skip, take} from "rxjs/operators";
 | 
			
		||||
import {MatBottomSheet, MatSnackBar} from "@angular/material";
 | 
			
		||||
import {CalibrateComponent} from "../../components/calibrate/calibrate.component";
 | 
			
		||||
import {ToolbarItem} from "../../components/toolbar/toolbarItem";
 | 
			
		||||
import {ToolbarItem} from "../../models/toolbarItem";
 | 
			
		||||
import {flyInRight, flyOutRight} from "../../animations";
 | 
			
		||||
import {ARROW, MapService} from "../../services/map.service";
 | 
			
		||||
import {ARROW, MapLayers, MapService, WeatherLayers} from "../../services/map.service";
 | 
			
		||||
 | 
			
		||||
declare const L;
 | 
			
		||||
 | 
			
		||||
@@ -16,23 +16,31 @@ declare const L;
 | 
			
		||||
    animations: [flyInRight, flyOutRight]
 | 
			
		||||
})
 | 
			
		||||
export class MapComponent implements OnInit {
 | 
			
		||||
    drawColor = '#ff4141';
 | 
			
		||||
    isNaN = isNaN;
 | 
			
		||||
    map: MapService;
 | 
			
		||||
    markers = [];
 | 
			
		||||
    position;
 | 
			
		||||
    positionMarker = {arrow: null, circle: null};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    drawColor = '#d82b00';
 | 
			
		||||
    showPalette = false;
 | 
			
		||||
    isNaN = isNaN;
 | 
			
		||||
 | 
			
		||||
    menu: ToolbarItem[] = [
 | 
			
		||||
        {name: 'Marker', icon: 'room', toggle: true, individualToggle: true, click: () => this.addMarker()},
 | 
			
		||||
        {name: 'Draw', icon: 'create', toggle: true, individualToggle: true, onEnabled: () => this.startDrawing(), onDisabled: () => this.endDrawing()},
 | 
			
		||||
        {name: 'Measure', icon: 'straighten', toggle: true, individualToggle: true, click: () => this.measure()},
 | 
			
		||||
        {name: 'Delete', icon: 'delete', toggle: true, individualToggle: true, onEnabled: () => this.map.deleteMode = true, onDisabled: () => this.map.deleteMode = false},
 | 
			
		||||
        {name: 'Style', icon: 'terrain', enabled: true, toggle: true},
 | 
			
		||||
        {name: 'Weather', icon: 'cloud', toggle: true},
 | 
			
		||||
        {name: 'Map Style', icon: 'terrain', toggle: true, subMenu: [
 | 
			
		||||
            {name: 'ESRI:Topographic', click: () => this.map.setMapLayer(MapLayers.ESRI_TOPOGRAPHIC)},
 | 
			
		||||
            {name: 'ESRI:Satelite', click: () => this.map.setMapLayer(MapLayers.ESRI_IMAGERY)},
 | 
			
		||||
            {name: 'ESRI:Satelite Clear', click: () => this.map.setMapLayer(MapLayers.ESRI_IMAGERY_CLARITY)}
 | 
			
		||||
        ]},
 | 
			
		||||
        {name: 'Weather', icon: 'cloud', toggle: true, subMenu: [
 | 
			
		||||
                {name: 'None', click: () => this.map.setWeatherLayer()},
 | 
			
		||||
                {name: 'Temperature', click: () => this.map.setWeatherLayer(WeatherLayers.TEMP_NEW)},
 | 
			
		||||
                {name: 'Wind', click: () => this.map.setWeatherLayer(WeatherLayers.WIND_NEW)},
 | 
			
		||||
                {name: 'Sea Level Pressure', click: () => this.map.setWeatherLayer(WeatherLayers.SEA_LEVEL_PRESSURE)},
 | 
			
		||||
                {name: 'Clouds', click: () => this.map.setWeatherLayer(WeatherLayers.CLOUDS_NEW)},
 | 
			
		||||
        ]},
 | 
			
		||||
        {name: 'Calibrate', icon: 'explore', click: () => this.calibrate()},
 | 
			
		||||
        {name: 'Messages', icon: 'chat', hidden: true},
 | 
			
		||||
        {name: 'Identity', icon: 'perm_identity', hidden: true},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user