Created
September 22, 2010 17:43
-
-
Save ollyjackson/592137 to your computer and use it in GitHub Desktop.
Google Maps API with Cloud Made tiles
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
var cloudmadeOptions = { | |
getTileUrl: function(coord, zoom) { | |
return "http://a.tile.cloudmade.com/<API KEY HERE>/<CLOUDMADE CUSTOM TILE ID>/256/" + | |
+ zoom + "/" + coord.x + "/" + coord.y + ".png"; | |
}, | |
tileSize: new google.maps.Size(256, 256), | |
isPng: true | |
}; | |
var cloudmadeType = new google.maps.ImageMapType(cloudmadeOptions); | |
map = new google.maps.Map(document.getElementById("gmap")); | |
map.setCenter(new google.maps.LatLng(37.76, -122.45)); | |
map.overlayMapTypes.insertAt(0, cloudmadeType); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment