summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-02-07 11:44:52 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-02-07 11:44:52 +0100
commit429b7bfc25fd6a71243f18c4bf626a1f8164b3e8 (patch)
tree9f498c6241ff3ef246d3e67a393b5e0f8aec3ba7
parent84216b2822f4949b41495053ab4d4b92590930bb (diff)
downloadsnap-yow-429b7bfc25fd6a71243f18c4bf626a1f8164b3e8.tar.gz
snap-yow-429b7bfc25fd6a71243f18c4bf626a1f8164b3e8.zip
set initial zoom to current position
-rwxr-xr-xsnap.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/snap.html b/snap.html
index 7ae8234..47184f0 100755
--- a/snap.html
+++ b/snap.html
@@ -43,7 +43,8 @@
window.map = map;
window.layer = layer;
- map = L.map('map').setView([51.505, -0.09], 13);
+ map = L.map('map');
+ map.locate({setView: true, maxZoom: 16});
layer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);