-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.html
73 lines (67 loc) · 2.07 KB
/
test.html
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<style>
html, body, #map {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
#map {
width: 100%;
height: 100%;
}
.button {
position: absolute;
background-color: #888;
font: bold 16px Helvetica;
padding: 5px 10px;
width: 10px;
color: white;
text-decoration: none;
border-radius: 3px;
display: inline-block;
text-align: center;
}
#plus {
top: 40px;
left: 40px;
}
#minus {
top: 40px;
left: 73px;
}
.button:hover {
background-color: #BBB;
}
</style>
</head>
<body>
<div id="map"></div>
<a id="plus" href="#" class="button">+</a>
<a id="minus" href="#" class="button">-</a>
</body>
<script src="gmaps_mercator.js"></script>
<script src="map.js"></script>
<script src="dragger.js"></script>
<script src="canvas_renderer.js"></script>
<script src="webgl.js"></script>
<script>
var map = new Map({
center: new LatLng(41.69, -4.83),
zoom: 4
});
////var view = new CanvasRenderer(document.getElementById('map'), map.model);
var view = new WebGLRenderer(document.getElementById('map'), map.model);
map.model.setCenter(map.model.center);
document.getElementById('plus').onclick = function() {
map.model.setZoom(map.model.zoom + 1);
return false;
}
document.getElementById('minus').onclick = function() {
map.model.setZoom(map.model.zoom - 1);
return false;
}
</script>
</html>