summaryrefslogtreecommitdiff
path: root/snap.html
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-02-07 11:26:06 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-02-07 11:26:06 +0100
commit84216b2822f4949b41495053ab4d4b92590930bb (patch)
tree6270e8e5ea71b0bb9d41e5353da8baf2ed9ed01a /snap.html
parent2f9d77be645e90fc58779141ecf5a8c906736ec9 (diff)
downloadsnap-yow-84216b2822f4949b41495053ab4d4b92590930bb.tar.gz
snap-yow-84216b2822f4949b41495053ab4d4b92590930bb.zip
add leaflet images; replace motion category by "map" and add blocks
Diffstat (limited to 'snap.html')
-rwxr-xr-xsnap.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/snap.html b/snap.html
index 562289d..7ae8234 100755
--- a/snap.html
+++ b/snap.html
@@ -22,7 +22,7 @@
<script type="text/javascript" src="cloud.js"></script>
<script type="text/javascript" src="sha512.js"></script>
<script type="text/javascript">
- var world, map, layer;
+ var world;
window.onload = function () {
world = new WorldMorph(document.getElementById('world'));
world.worldCanvas.focus();
@@ -36,8 +36,13 @@
</head>
<body style="margin: 0;">
<canvas id="world" tabindex="1" style="position: absolute;"></canvas>
- <div id="map" style="position: absolute;" />
+ <div id="map" style="position: absolute; width: 480px; height: 360px;" />
+ <!-- set initial size to 480x360 or the map will not load properly -->
<script type="text/javascript">
+ var map, layer;
+ window.map = map;
+ window.layer = layer;
+
map = L.map('map').setView([51.505, -0.09], 13);
layer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'