Commit 11587c7b authored by Andres Käver's avatar Andres Käver
Browse files

s/f markers

parent 7acb026e
Pipeline #793 passed with stages
in 1 minute and 14 seconds
......@@ -134,7 +134,17 @@ export class HomeIndex {
});
const iconCp = L.icon({
iconUrl: '/marker-icon-wp.png',
iconUrl: '/marker-icon-cp.png',
iconSize: [25, 41], // size of the icon
iconAnchor: [12, 40], // point of the icon which will correspond to marker's location
});
const iconS = L.icon({
iconUrl: '/marker-icon-s.png',
iconSize: [25, 41], // size of the icon
iconAnchor: [12, 40], // point of the icon which will correspond to marker's location
});
const iconF = L.icon({
iconUrl: '/marker-icon-f.png',
iconSize: [25, 41], // size of the icon
iconAnchor: [12, 40], // point of the icon which will correspond to marker's location
});
......@@ -155,6 +165,15 @@ export class HomeIndex {
});
// add start marker
if (polylinePoints.length>0){
L.marker([this.gpsLocations[0].latitude, this.gpsLocations[0].longitude], {icon: iconS}).addTo(this.map);
}
// add finish marker
if (polylinePoints.length>1){
L.marker([this.gpsLocations[this.gpsLocations.length-1].latitude, this.gpsLocations[this.gpsLocations.length-1].longitude], {icon: iconF}).addTo(this.map);
}
if (polylinePoints.length > 0) {
const polyline = L.polyline(polylinePoints).addTo(this.map);
this.map.fitBounds(polyline.getBounds());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment