Skip to content

Instantly share code, notes, and snippets.

@ollyjackson
Created September 22, 2010 17:43
Show Gist options
  • Save ollyjackson/592137 to your computer and use it in GitHub Desktop.
Save ollyjackson/592137 to your computer and use it in GitHub Desktop.
Google Maps API with Cloud Made tiles
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