-
-
Save tmcw/2152798 to your computer and use it in GitHub Desktop.
modest map problem
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Modest Maps JS</title> | |
<script type="text/javascript" src="https://raw.github.com/stamen/modestmaps-js/master/modestmaps.js"></script> | |
<script type="text/javascript"> | |
var map; | |
function initMap() { | |
// some test | |
function Test() { } | |
Test.prototype.getTile = function(coord) { | |
var div = document.createElement('div'); | |
div.innerHTML = 'test'; | |
return div; | |
} | |
MM.extend(Test, MM.MapProvider); | |
fg = new MM.Layer(new Test()); | |
map = new MM.Map(document.body, [fg]); | |
map.setCenterZoom(new MM.Location(0, 0), 2); | |
} | |
</script> | |
<style> | |
html, body { | |
width: 100%; height: 100%; | |
} | |
</style> | |
</head> | |
<body onload="initMap()"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment