diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-02-27 18:29:57 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-02-27 18:29:57 +0100 |
| commit | 5eeee705bcd55d375c0be9e113abd6481c3a570d (patch) | |
| tree | 812c0acb8ab2682a7fff768a8024e6a44b12268f | |
| parent | ce2d8c203d872a59ae329c7b4dae31c423dc7e4a (diff) | |
| download | snap-yow-5eeee705bcd55d375c0be9e113abd6481c3a570d.tar.gz snap-yow-5eeee705bcd55d375c0be9e113abd6481c3a570d.zip | |
fix loading problems
| -rwxr-xr-x | snap.html | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -6,7 +6,7 @@ <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="leaflet.css" /> <script type="text/javascript" src="leaflet.js"></script> - <script type="text/javascript" src="OSMBuildings-Leaflet.js"></script> + <script type="text/javascript" src="osmbuildings/dist/OSMBuildings-Leaflet.js"></script> <script type="text/javascript" src="morphic.js"></script> <script type="text/javascript" src="widgets.js"></script> <script type="text/javascript" src="blocks.js"></script> @@ -56,11 +56,6 @@ } function startYOW (e) { - setGlobalPosition(e); - map.stopLocate(); - map.on('locationfound', setGlobalPosition); - map.locate({watch: true, enableHighAccuracy: true}); - new OSMBuildings(map).load(); window.spriteGroup = spriteGroup; @@ -74,6 +69,11 @@ // TODO: this needs to be improved function loadDefaultCostume (e) { + setGlobalPosition(e); + map.stopLocate(); + map.on('locationfound', setGlobalPosition); + map.locate({watch: true, enableHighAccuracy: true}); + image = new Image(); image.src = 'images/marker-icon.png'; image.onload = function () { |
