diff options
author | Jonas Smedegaard <dr@jones.dk> | 2016-02-19 15:09:29 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2016-02-19 15:09:29 +0100 |
commit | c2044fcc858c63e0e77061d80f1ee81c0c66edde (patch) | |
tree | 9ac2116b98fb15ab38b20785143bf797e6ec82d1 | |
parent | 8bb9af48e6017ed8b7a8b16443ad40317a4767ad (diff) |
Tidy intialization.
-rw-r--r-- | templates/map.mdwn | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/templates/map.mdwn b/templates/map.mdwn index 74c0884e..803d1ace 100644 --- a/templates/map.mdwn +++ b/templates/map.mdwn @@ -6,10 +6,8 @@ var attribOSM = '© <a href="https://openstreetmap.org">OpenStreetMap</a>-bidragydere, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'; var OSMLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: attribOSM } ); var Box = L.latLngBounds( [[<TMPL_VAR bounds-nw>],[<TMPL_VAR bounds-se>]] ); - -map = L.map('content', { layers: [OSMLayer] }); +var map = L.map('content', { layers: [OSMLayer] }).fitBounds(Box); map.attributionControl.setPrefix(false); -map.fitBounds(Box); L.control.scale({ imperial: false }).addTo(map); |