use tab instead of separate control for transit demo

This commit is contained in:
Norbert Renner 2016-06-03 21:08:48 +02:00
parent 8bd8fc3256
commit 4f558a0956
11 changed files with 52 additions and 24 deletions

View file

@ -122,6 +122,7 @@
iternity,
elevation,
download,
tabs,
profile,
trackMessages,
routingToolbar,
@ -303,19 +304,23 @@
}));
}
routingOptions.addTo(map);
if (BR.conf.transit) {
iternity.addTo(map);
} else {
if (!BR.conf.transit) {
stats.addTo(map);
}
download.addTo(map);
elevation.addTo(map);
map.addControl(new BR.Tabs({
tabs = new BR.Tabs({
tabs: {
'#tab_iternity': iternity,
'#tab_profile': profile,
'#tab_data': trackMessages
}
}));
});
if (!BR.conf.transit) {
delete tabs.options.tabs['#tab_iternity'];
}
map.addControl(tabs);
nogos.addTo(map);
routing.addTo(map);