diff --git a/doc/Extensions/Globe-Frontpage.md b/doc/Extensions/Globe-Frontpage.md index 2594eb8e32..55454d59e5 100644 --- a/doc/Extensions/Globe-Frontpage.md +++ b/doc/Extensions/Globe-Frontpage.md @@ -35,6 +35,11 @@ $config['leaflet']['default_lng'] = "-3.401402"; $config['leaflet']['default_zoom'] = 8; ``` +If you can't access OpenStreet map directly you can run a local [tile server](http://wiki.openstreetmap.org/wiki/Tile_servers). To specify a different url you can set: + +```php +$config['leaflet']['tile_url'] = 'localhost.com'; +``` ### Jquery-Mapael config Further custom options are available to load different maps of the world, set default coordinates of where the map will zoom and the zoom level by default. An example of diff --git a/html/includes/common/worldmap.inc.php b/html/includes/common/worldmap.inc.php index ddaad352af..dd0fd7ca1d 100644 --- a/html/includes/common/worldmap.inc.php +++ b/html/includes/common/worldmap.inc.php @@ -131,7 +131,7 @@ if ($config['map']['engine'] == 'leaflet') { } $map_init = "[" . $init_lat . ", " . $init_lng . "], " . sprintf("%01.0f", $init_zoom); $temp_output .= 'var map = L.map(\'leaflet-map\').setView('.$map_init.'); -L.tileLayer(\'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\', { +L.tileLayer(\'//'.$config['leaflet']['tile_url'].'/{z}/{x}/{y}.png\', { attribution: \'© OpenStreetMap contributors\' }).addTo(map); diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 2b292f58a3..83cb9d80f5 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -844,7 +844,8 @@ $config['map']['engine'] = 'leaflet'; $config['mapael']['default_map'] = 'maps/world_countries.js'; $config['leaflet']['default_lat'] = '51.4800'; $config['leaflet']['default_lng'] = '0'; -$config['leaflet']['default_zoom'] = 2; +$config['leaflet']['default_zoom'] = 2; +$config['leaflet']['tile_url'] = "{s}.tile.openstreetmap.org"; // General GUI options $config['gui']['network-map']['style'] = 'new';//old is also valid