Added new measure icon

This commit is contained in:
Zakary Timson 2019-08-24 19:03:06 -04:00
parent b243e91fcd
commit b40ced8ece
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,6 @@ import {BehaviorSubject} from "rxjs";
import {distanceInM} from "../utils";
import {environment} from "../../environments/environment";
import {LatLng} from "../models/latlng";
import {filter} from "rxjs/operators";
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 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 {
private drawListener;

View File

@ -5,7 +5,7 @@ import {MatBottomSheet, MatSnackBar} from "@angular/material";
import {CalibrateComponent} from "../../components/calibrate/calibrate.component";
import {ToolbarItem} from "../../models/toolbarItem";
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 {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.delete(this.lastMeasuringPoint);
}
this.lastMeasuringPoint = this.map.newMarker(e.event.latlng);
this.lastMeasuringPoint = this.map.newMarker(e.event.latlng, {icon: MEASURE});
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB