Add config option for initial map position and zoom
This commit is contained in:
parent
46ed85be2c
commit
e91b22ede0
2 changed files with 5 additions and 1 deletions
|
|
@ -30,6 +30,10 @@
|
|||
//BR.conf.profilesUrl = 'file://YOUR_PATH_TO/profiles2/';
|
||||
}
|
||||
|
||||
// Set the initial position and zoom level of the map
|
||||
BR.conf.initialMapLocation = [50.99, 9.86];
|
||||
BR.conf.initialMapZoom = 5;
|
||||
|
||||
BR.conf.profiles = [
|
||||
'trekking',
|
||||
'fastbike',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ BR.Map = {
|
|||
})
|
||||
.addTo(map);
|
||||
if (!map.restoreView()) {
|
||||
map.setView([50.99, 9.86], 5);
|
||||
map.setView(BR.conf.initialMapLocation, BR.conf.initialMapZoom);
|
||||
}
|
||||
|
||||
// two attribution lines by adding two controls, prevents ugly wrapping on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue