-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (44 loc) · 1.67 KB
/
index.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
<html>
<head>
<title>Example Map</title>
<link rel="stylesheet" type="text/css" href="app/stylesheets/yarn.css">
<style type="text/css">
#map {
position: relative;
width: 1024px;
height: 768px;
overflow: hidden;
}
</style>
<script type="text/javascript" src="app/lib/underscore-min.js"></script>
<script type="text/javascript" src="app/lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="app/lib/backbone-min.js"></script>
<script type="text/javascript" src="app/lib/cocktail.js"></script>
<script type="text/javascript" src="dist/yarn.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var mapEl = document.getElementById('map'),
// center = new yarn.LatLng(0, 0),
lat = 40.039722,
lng = -76.304444,
center = new yarn.LatLng(lat, lng),
// center = new yarn.LatLng(60, -130),
options = {
el: mapEl,
center: center,
zoom: 10,
tileSize: 256
},
map = new yarn.Map(options);
map.addMarker({ latLng: new yarn.LatLng(lat + .01, lng + .05) });
map.addMarker({ latLng: new yarn.LatLng(lat, lng) });
// setTimeout(function() { map.setZoom(8); }, 1500);
// setInterval(function() { lng += .05; map.setCenter(new yarn.LatLng(lat, lng)); }, 3000);
});
</script>
</head>
<body>
<div id="map">
</div>
</body>
</html>