Add reverse route button
This commit is contained in:
parent
79ce49fdb8
commit
d009aa5bc6
3 changed files with 19 additions and 2 deletions
13
js/index.js
13
js/index.js
|
|
@ -35,6 +35,7 @@
|
|||
deleteButton,
|
||||
drawToolbar,
|
||||
urlHash,
|
||||
reverseRoute,
|
||||
saveWarningShown = false;
|
||||
|
||||
// By default bootstrap-select use glyphicons
|
||||
|
|
@ -70,6 +71,14 @@
|
|||
}]
|
||||
});
|
||||
|
||||
reverseRouteButton = L.easyButton(
|
||||
'fa-random',
|
||||
function () {
|
||||
routing.reverse();
|
||||
},
|
||||
i18next.t('map.reverse-route')
|
||||
);
|
||||
|
||||
deleteButton = L.easyButton(
|
||||
'fa-trash-o',
|
||||
function () {
|
||||
|
|
@ -227,7 +236,7 @@
|
|||
|
||||
routing.addTo(map);
|
||||
elevation.addBelow(map);
|
||||
|
||||
|
||||
sidebar = BR.sidebar({
|
||||
defaultTabId: BR.conf.transit ? 'tab_itinerary' : 'tab_profile',
|
||||
listeningTabs: {
|
||||
|
|
@ -240,7 +249,7 @@
|
|||
}
|
||||
|
||||
nogos.addTo(map);
|
||||
drawToolbar = L.easyBar([drawButton, nogos.getButton(), deleteButton]).addTo(map);
|
||||
drawToolbar = L.easyBar([drawButton, reverseRouteButton, nogos.getButton(), deleteButton]).addTo(map);
|
||||
nogos.preventRoutePointOnCreate(routing);
|
||||
|
||||
if (BR.keys.strava) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue