Created
April 15, 2011 00:02
-
-
Save sansumbrella/920863 to your computer and use it in GitHub Desktop.
Basic use of polymaps. Loads tiles generated by https://gist.github.com/915807
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Polymaps Learning</title> | |
<meta name="author" content="David Wicks"/> | |
<!-- Date: 2011-04-11 --> | |
<!-- Get polymaps for this to work: http://polymaps.org/ --> | |
<script type="text/javascript" src="lib/polymaps.min.js"></script> | |
<script type="text/javascript"> | |
function run() | |
{ | |
var po = org.polymaps; | |
var ck = new Date().getMilliseconds(); | |
var map = po.map() | |
.container(document.getElementById("map").appendChild(po.svg("svg"))) | |
.center({lat: 40, lon: -95}) | |
.zoomRange([1, 4]) | |
.zoom(2) | |
.add(po.interact()); | |
map.add(po.image().url("tiles/{Z}/{X}.{Y}.png?ck=" + ck )); | |
map.add(po.compass() | |
.pan("none")); | |
map.container().setAttribute("class", "Blues"); | |
} | |
</script> | |
</head> | |
<body onload="run();"> | |
<h1>Some Map</h1> | |
<div id="map"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment