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
|
<!DOCTYPE html>
<html>
<head>
<title>Modest Maps JS</title>
<script type="text/javascript" src="../../modestmaps.min.js"></script>
<script type="text/javascript">
var map;
function initMap() {
var MM = com.modestmaps;
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png';
var subdomains = [ '', 'a.', 'b.', 'c.' ];
var provider = new MM.TemplatedLayer(template, subdomains);
map = new MM.Map(document.body, provider)
map.setCenterZoom(new MM.Location(0, 0), 2);
}
</script>
<style>
html, body {
width: 100%; height: 100%;
}
</style>
</head>
<body onload="initMap()">
</body>
</html>
|