Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (33 sloc) 1.37 KB
<!DOCTYPE html>
<html>
<head>
<title>Modest Maps JS</title>
<script type="text/javascript" src="../../modestmaps.js"></script>
<script type="text/javascript" src="follower.js"></script>
<script type="text/javascript">
var map;
function initMap() {
var input = document.getElementById('url');
if (location.search && location.search.length > 1) {
var index = location.search.indexOf('url');
if (index > 0) {
input.value = decodeURIComponent(location.search.slice(index+4));
}
}
map = new MM.Map('map', new MM.TemplatedLayer(input.value))
var f = new MM.Follower(map, new MM.Location(37.811530, -122.2666097), '&#xB0; Broadway and Grand');
map.setCenterZoom(new MM.Location(37.811530, -122.2666097), 14);
}
</script>
</head>
<body onload="initMap()">
<h1>Modest Maps JS</h1>
<form method="GET" action="index.html">
<input type="text" name="url" id="url" size="48" value="http://tile.openstreetmap.org/{Z}/{X}/{Y}.png">
<input type="submit" value="Go!">
</form>
<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" style="width: 100%; height: 500px"></div>
</body>
</html>
Something went wrong with that request. Please try again.