File: index.html

package info (click to toggle)
modestmaps-js 3.3.6%2Bds2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,184 kB
  • ctags: 1,465
  • sloc: makefile: 58
file content (37 lines) | stat: -rw-r--r-- 1,334 bytes parent folder | download | duplicates (2)
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
<html>
<head>
<title>Modest Maps JS</title>
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script type="text/javascript" src="../../modestmaps.js"></script>
<script type="text/javascript" src="follower-canvas.js"></script>
<script type="text/javascript">
    var map;
    function initMap() {
        var src = document.getElementById('src');
        eval(src.textContent || src.innerText);
    }
</script>
</head>
<body onload="initMap()">
<h1>Modest Maps JS</h1>
<p><a href="javascript:map.zoomIn()">zoom in</a> | <a href="javascript:map.zoomOut()">zoom out</a>
<br><a href="javascript:map.panLeft()">pan left</a> | <a href="javascript:map.panRight()">pan right</a> | <a href="javascript:map.panDown()">pan down</a> | <a href="javascript:map.panUp()">pan up</a></p>
<div id="map">
</div>
<p>The above div is a map initialized like so:</p>
<pre id="src">
// "import" the namespace
var mm = com.modestmaps;

var layer = new mm.TemplatedLayer('http://osm-bayarea.s3.amazonaws.com/{Z}-r{Y}-c{X}.jpg');

map = new mm.Map('map', layer, new mm.Point(1024,768))

var f = new mm.Follower(map, new mm.Location(37.811530, -122.2666097), 'Broadway and Grand');

map.setCenterZoom(new mm.Location(37.811530, -122.2666097), 14);
</pre>
<p>Hands up who wants overlays?</p>
<div id="log"></div>
</body>
</html>