diff --git a/README.md b/README.md index 93916ef..83c5656 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ #### Some features are maybe merged - Updates selected node or list (incl. image stats cache-breaker) - not only overview tables +- Zoom level for nodes (`nodeZoom`) - Formatted Code - Grunt inline for some css and js - less requests - Icon font with only needed icons @@ -88,6 +89,11 @@ Setting this to `false` will hide contact information for nodes. Nodes being online for less than maxAge days are considered "new". Likewise, nodes being offline for more than than maxAge days are considered "lost". +## nodeZoom (integer) + +Max level to be applied by clicking a node or open a node. With value `18` near by buildings and streets should be visible. +Interesting if one of configured map provider has zoom-level under `18`. + ## mapLayers (List) A list of objects describing map layers. Each object has at least `name` diff --git a/config.json b/config.json index 8ff9d2a..34376bb 100644 --- a/config.json +++ b/config.json @@ -28,6 +28,7 @@ "siteName": "Freifunk Regensburg", "showContact": false, "maxAge": 14, + "nodeZoom": 18, "mapLayers": [ { "name": "OpenStreetMap.HOT", diff --git a/lib/map.js b/lib/map.js index 0afdee8..bc91664 100644 --- a/lib/map.js +++ b/lib/map.js @@ -301,7 +301,7 @@ define(["map/clientlayer", "map/labelslayer", } function setView(bounds) { - map.fitBounds(bounds, {paddingTopLeft: [sidebar(), 0]}); + map.fitBounds(bounds, {paddingTopLeft: [sidebar(), 0], maxZoom: config.nodeZoom}); } function resetZoom() {