Browse Source

Configure maxZoom in conf.php

master
parent
commit
f9a5e5d7dd
  1. 3
      conf.php-dist
  2. 4
      src/mapLayers.js

3
conf.php-dist

@ -17,6 +17,9 @@ $config['defaultView'] = array('lat' => 51.505, 'lon' => -0.09, 'zoom' => 18);
// Shall the initial map view be retrieved via IP location? (default: true)
$config['checkIpLocation'] = true;
// maxZoom (tiles will be scaled if higher than native zoom level). Default: 19.
$config['maxZoom'] = 19;
// Available base maps; first is default
$config['baseMaps'] = array(
array(

4
src/mapLayers.js

@ -2,7 +2,7 @@ register_hook('init', function () {
if (!config.baseMaps) {
var osm_mapnik = L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{
maxZoom: 19,
maxZoom: config.maxZoom || 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}
)
@ -21,7 +21,7 @@ register_hook('init', function () {
{
attribution: def.attribution,
maxNativeZoom: def.maxZoom,
maxZoom: 19
maxZoom: config.maxZoom || 19
}
)

Loading…
Cancel
Save