Skip to content

Instantly share code, notes, and snippets.

@javisantana
Created March 21, 2012 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save javisantana/2152778 to your computer and use it in GitHub Desktop.
Save javisantana/2152778 to your computer and use it in GitHub Desktop.
modest map problem
<!DOCTYPE html>
<html>
<head>
<title>Modest Maps JS</title>
<script type="text/javascript" src="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