Created
March 6, 2012 01:00
-
-
Save shawnbot/1982587 to your computer and use it in GitHub Desktop.
Stamen tiles in popular map engines
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = "toner"; | |
var map = new google.maps.Map(document.getElementById("element_id"), { | |
center: new google.maps.LatLng(37.7, -122.4), | |
zoom: 12, | |
mapTypeId: layer, | |
mapTypeControlOptions: { | |
mapTypeIds: [layer] | |
} | |
}); | |
map.mapTypes.set(layer, new google.maps.StamenMapType(layer)); |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = new L.StamenTileLayer("toner"); | |
var map = new L.Map("element_id", { | |
center: new L.LatLng(37.7, -122.4), | |
zoom: 12 | |
}); | |
map.addLayer(layer); |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = new MM.StamenTileLayer("toner"); | |
var map = new MM.Map("element_id", layer); | |
map.setCenterZoom(new MM.Location(37.7, -122.4), 12); |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = new OpenLayers.Layer.Stamen("toner"); | |
var map = new OpenLayers.Map("element_id"); | |
map.addLayer(layer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment