diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-02-07 11:44:52 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-02-07 11:44:52 +0100 |
| commit | 429b7bfc25fd6a71243f18c4bf626a1f8164b3e8 (patch) | |
| tree | 9f498c6241ff3ef246d3e67a393b5e0f8aec3ba7 | |
| parent | 84216b2822f4949b41495053ab4d4b92590930bb (diff) | |
| download | snap-yow-429b7bfc25fd6a71243f18c4bf626a1f8164b3e8.tar.gz snap-yow-429b7bfc25fd6a71243f18c4bf626a1f8164b3e8.zip | |
set initial zoom to current position
| -rwxr-xr-x | snap.html | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' }).addTo(map); |
