diff --git a/src/app/services/map.service.ts b/src/app/services/map.service.ts index dfe9eef..a8c8133 100644 --- a/src/app/services/map.service.ts +++ b/src/app/services/map.service.ts @@ -93,6 +93,7 @@ export class MapService { } newMarker(latlng: LatLng, opts: any={}) { + if(!opts.icon) opts.icon = L.icon({iconUrl: '/assets/images/marker.png', iconSize: [40, 55], iconAnchor: [20, 55]}); let marker = L.marker(latlng, opts).addTo(this.map); this.markers.push(marker); marker.on('click', () => { @@ -105,10 +106,10 @@ export class MapService { } newMeasurement(latlng1: LatLng, latlng2: LatLng) { - let line = L.polyline([latlng1, latlng2], {weight: 5}).addTo(this.map); + let line = L.polyline([latlng1, latlng2], {color: '#d82b00', weight: 5}).addTo(this.map); let decoration = L.polylineDecorator(line, {patterns: [ - {offset: '100%', repeat: 0, symbol: L.Symbol.arrowHead({pixelSize: 15, polygon: false, headAngle: 180, pathOptions: {stroke: true}})}, - {offset: '-100%', repeat: 0, symbol: L.Symbol.arrowHead({pixelSize: 15, polygon: false, headAngle: 180, pathOptions: {stroke: true}})} + {offset: '100%', repeat: 0, symbol: L.Symbol.arrowHead({pixelSize: 15, polygon: false, headAngle: 180, pathOptions: {color: '#d82b00', stroke: true}})}, + {offset: '-100%', repeat: 0, symbol: L.Symbol.arrowHead({pixelSize: 15, polygon: false, headAngle: 180, pathOptions: {color: '#d82b00', stroke: true}})} ]}).addTo(this.map); this.measurements.push({line: line, decoration: decoration}); let distance = distanceInM(latlng1.lat, latlng1.lng, latlng2.lat, latlng2.lng); diff --git a/src/assets/images/marker.png b/src/assets/images/marker.png new file mode 100644 index 0000000..dada3e1 Binary files /dev/null and b/src/assets/images/marker.png differ