Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (33 sloc) 1.37 KB
<!DOCTYPE html>
<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 ( && > 1) {
var index ='url');
if (index > 0) {
input.value = decodeURIComponent(;
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);
<body onload="initMap()">
<h1>Modest Maps JS</h1>
<form method="GET" action="index.html">
<input type="text" name="url" id="url" size="48" value="{Z}/{X}/{Y}.png">
<input type="submit" value="Go!">
<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>
Jump to Line
Something went wrong with that request. Please try again.