Merge pull request #132 from bagage/feat_add_strava
Add leaflet strava segments
This commit is contained in:
commit
db11eb00fb
3 changed files with 14 additions and 1 deletions
|
|
@ -24,13 +24,15 @@
|
||||||
"seiyria-bootstrap-slider": "^9.8.1",
|
"seiyria-bootstrap-slider": "^9.8.1",
|
||||||
"url-search-params": "~0.5.0",
|
"url-search-params": "~0.5.0",
|
||||||
"Leaflet.RestoreView": "makinacorpus/Leaflet.RestoreView#master",
|
"Leaflet.RestoreView": "makinacorpus/Leaflet.RestoreView#master",
|
||||||
|
"leaflet.stravasegments": "bagage/leaflet.stravasegments#master",
|
||||||
"leaflet.locatecontrol": "^0.60.0",
|
"leaflet.locatecontrol": "^0.60.0",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"bootstrap-select": "hugdx/bootstrap-select#patch-1",
|
"bootstrap-select": "hugdx/bootstrap-select#patch-1",
|
||||||
"leaflet-sidebar-v2": "nrenner/leaflet-sidebar-v2#dev",
|
"leaflet-sidebar-v2": "nrenner/leaflet-sidebar-v2#dev",
|
||||||
"leaflet.editable": "^1.1.0",
|
"leaflet.editable": "^1.1.0",
|
||||||
"codemirror": "^5.35.0",
|
"codemirror": "^5.35.0",
|
||||||
"mapbbcode": "MapBBCode/mapbbcode#v1.2.0"
|
"mapbbcode": "MapBBCode/mapbbcode#v1.2.0",
|
||||||
|
"@mapbox/polyline": "^0.2.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"leaflet": {
|
"leaflet": {
|
||||||
|
|
|
||||||
|
|
@ -128,4 +128,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Strava API token in case you want to display Strava segments
|
||||||
|
BR.conf.stravaToken = null;
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,14 @@
|
||||||
drawToolbar = L.easyBar([drawButton, nogos.getButton(), deleteButton]).addTo(map);
|
drawToolbar = L.easyBar([drawButton, nogos.getButton(), deleteButton]).addTo(map);
|
||||||
nogos.preventRoutePointOnCreate(routing);
|
nogos.preventRoutePointOnCreate(routing);
|
||||||
|
|
||||||
|
if (BR.conf.stravaToken) {
|
||||||
|
new L.Control.StravaSegments(
|
||||||
|
{
|
||||||
|
stravaToken: BR.conf.stravaToken
|
||||||
|
})
|
||||||
|
.addTo(map);
|
||||||
|
}
|
||||||
|
|
||||||
map.addControl(new BR.OpacitySlider({
|
map.addControl(new BR.OpacitySlider({
|
||||||
callback: L.bind(routing.setOpacity, routing)
|
callback: L.bind(routing.setOpacity, routing)
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue