-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
33 lines (33 loc) · 822 Bytes
/
index.html
File metadata and controls
33 lines (33 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<title>mgrid</title>
<style type='text/css'>
body {
font:13px/20px 'Helvetica Neue';
}
#grid {
width:500px;
height:500px;
border:1px solid #000;
}
</style>
</head>
<body>
<h2>mgrid - pico grid management</h2>
<div id='grid'></div>
<script src='mgrid.js'></script>
<script>
var g = mgrid();
g.parent(document.getElementById('grid'));
var z = 5;
for (var x = 0; x < Math.pow(2, z); x++) {
for (var y = 0; y < Math.pow(2, z); y++) {
var im = document.createElement('img');
im.src = 'http://a.tiles.mapbox.com/v3/mapbox.mapbox-streets/' + z + '/' + x + '/' + y + '.png';
g.tile([z, x, y], im);
}
}
</script>
</body>
</html>