From a23634e1c4daa0a661667c50bb64cb3d33419208 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 17 Oct 2019 21:20:20 +0200 Subject: [PATCH] Use custom markers for start and end --- js/plugin/Routing.js | 8 +++----- package.json | 2 +- yarn.lock | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/js/plugin/Routing.js b/js/plugin/Routing.js index fb08176..33c7678 100644 --- a/js/plugin/Routing.js +++ b/js/plugin/Routing.js @@ -8,11 +8,9 @@ BR.Routing = L.Routing.extend({ options: { position: 'topright', icons: { - /* not implemented yet - start: new L.Icon.Default({iconUrl: 'bower_components/leaflet-gpx/pin-icon-start.png'}), - end: new L.Icon.Default(), - normal: new L.Icon.Default() - */ + start: L.AwesomeMarkers.icon({ icon: 'play', markerColor: 'green' }), + normal: L.AwesomeMarkers.icon({ icon: 'circle', markerColor: 'blue' }), + end: L.AwesomeMarkers.icon({ icon: 'stop', markerColor: 'red' }), draw: false, opacity: 1 }, diff --git a/package.json b/package.json index 8c00008..1d91c40 100644 --- a/package.json +++ b/package.json @@ -48,9 +48,9 @@ "leaflet-easybutton": "*", "leaflet-editable": "^1.1.0", "leaflet-elevation": "nrenner/Leaflet.Elevation#dev", - "leaflet-hotline": "^0.4.0", "leaflet-filelayer": "^1.2.0", "leaflet-geometryutil": "^0.9.1", + "leaflet-hotline": "^0.4.0", "leaflet-plugins": "~3.0.0", "leaflet-providers": "^1.5.0", "leaflet-routing": "nrenner/leaflet-routing#dev", diff --git a/yarn.lock b/yarn.lock index 0f17d12..e4196d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4477,7 +4477,7 @@ leaflet-providers@^1.5.0: leaflet-routing@nrenner/leaflet-routing#dev: version "0.1.1" - resolved "https://codeload.github.com/nrenner/leaflet-routing/tar.gz/bbe5df8af500948251337a7e6c09d14f9fad6d8d" + resolved "https://codeload.github.com/nrenner/leaflet-routing/tar.gz/84bb47a88d2b8366e9cdb46835e8620d2678d089" leaflet-sidebar-v2@nrenner/leaflet-sidebar-v2#dev: version "3.0.2"