Added new measure icon
This commit is contained in:
parent
b243e91fcd
commit
b40ced8ece
@ -2,7 +2,6 @@ import {BehaviorSubject} from "rxjs";
|
|||||||
import {distanceInM} from "../utils";
|
import {distanceInM} from "../utils";
|
||||||
import {environment} from "../../environments/environment";
|
import {environment} from "../../environments/environment";
|
||||||
import {LatLng} from "../models/latlng";
|
import {LatLng} from "../models/latlng";
|
||||||
import {filter} from "rxjs/operators";
|
|
||||||
|
|
||||||
declare const L;
|
declare const L;
|
||||||
|
|
||||||
@ -22,6 +21,7 @@ export enum WeatherLayers {
|
|||||||
|
|
||||||
export const ARROW = L.icon({iconUrl: '/assets/images/arrow.png', iconSize: [40, 45], iconAnchor: [20, 23]});
|
export const ARROW = L.icon({iconUrl: '/assets/images/arrow.png', iconSize: [40, 45], iconAnchor: [20, 23]});
|
||||||
export const MARKER = L.icon({iconUrl: '/assets/images/marker.png', iconSize: [40, 55], iconAnchor: [20, 55]});
|
export const MARKER = L.icon({iconUrl: '/assets/images/marker.png', iconSize: [40, 55], iconAnchor: [20, 55]});
|
||||||
|
export const MEASURE = L.icon({iconUrl: '/assets/images/measure.png', iconSize: [75, 50], iconAnchor: [25, 25]});
|
||||||
|
|
||||||
export class MapService {
|
export class MapService {
|
||||||
private drawListener;
|
private drawListener;
|
||||||
|
@ -5,7 +5,7 @@ import {MatBottomSheet, MatSnackBar} from "@angular/material";
|
|||||||
import {CalibrateComponent} from "../../components/calibrate/calibrate.component";
|
import {CalibrateComponent} from "../../components/calibrate/calibrate.component";
|
||||||
import {ToolbarItem} from "../../models/toolbarItem";
|
import {ToolbarItem} from "../../models/toolbarItem";
|
||||||
import {flyInRight, flyOutRight} from "../../animations";
|
import {flyInRight, flyOutRight} from "../../animations";
|
||||||
import {ARROW, MapLayers, MapService, WeatherLayers} from "../../services/map.service";
|
import {ARROW, MapLayers, MapService, MEASURE, WeatherLayers} from "../../services/map.service";
|
||||||
import {Subscription} from "rxjs";
|
import {Subscription} from "rxjs";
|
||||||
import {MarkerComponent} from "../../components/marker/marker.component";
|
import {MarkerComponent} from "../../components/marker/marker.component";
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ export class MapComponent implements OnInit {
|
|||||||
this.map.newMeasurement(this.lastMeasuringPoint.getLatLng(), e.event.latlng);
|
this.map.newMeasurement(this.lastMeasuringPoint.getLatLng(), e.event.latlng);
|
||||||
this.map.delete(this.lastMeasuringPoint);
|
this.map.delete(this.lastMeasuringPoint);
|
||||||
}
|
}
|
||||||
this.lastMeasuringPoint = this.map.newMarker(e.event.latlng);
|
this.lastMeasuringPoint = this.map.newMarker(e.event.latlng, {icon: MEASURE});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
src/assets/images/measure.png
Normal file
BIN
src/assets/images/measure.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
Loading…
Reference in New Issue
Block a user