diff --git a/conf.php-dist b/conf.php-dist index e6e42a1a..729805d8 100644 --- a/conf.php-dist +++ b/conf.php-dist @@ -4,3 +4,6 @@ $config['categoriesDir'] = 'node_modules/openstreetbrowser-categories-main'; // URL of the Overpass API $config['overpassUrl'] = '//overpass-api.de/api/interpreter'; + +// Location of the initial view if no IP-location can be resolved. 'zoom' is optional. +$config['defaultView'] = array('lat' => 51.505, 'lon' => -0.09, 'zoom' => 18); diff --git a/src/index.js b/src/index.js index 65535afc..b08973c7 100644 --- a/src/index.js +++ b/src/index.js @@ -23,7 +23,7 @@ window.onload = function() { if (typeof ipLoc === 'object' && 'latitude' in ipLoc) { map.setView([ ipLoc.latitude, ipLoc.longitude ], 14) } else { - map.setView([ 51.505, -0.09 ], 14) + map.setView(config.defaultView, 'zoom' in config.defaultView ? config.defaultView.zoom : 14) } })