netconstructor / maps.stamen.com

Stamen Maps

Home Page:http://maps.stamen.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is the code behind the Stamen maps site, which shows off our custom tiles and explains how to get them into other sites.

This repository also hosts a JavaScript utility which patches other map libraries to provide Stamen tile layers. Simply grab a copy of js/tiles.stamen.js and include it on your page after your favorite mapping library, then follow the instructions below:

ModestMaps:

var map = new MM.Map(...);
var layer = new MM.StamenTileLayer("toner");
map.addLayer(layer);

Leaflet:

var map = new L.Map(...);
var layer = new L.StamenTileLayer("terrain");
map.addLayer(layer);

OpenLayers:

var map = new OpenLayers.Map(...);
var layer = new OpenLayers.Layer.Stamen("watercolor");
map.addLayer(layer);

Google Maps V3:

var map = new google.maps.Map(...);
map.mapTypes.set("toner", new google.maps.StamenMapType("toner"));
map.setMapTypeId("toner");

About

Stamen Maps

http://maps.stamen.com