Skip to content

Instantly share code, notes, and snippets.

View nvkelso's full-sized avatar

Nathaniel V. KELSO nvkelso

View GitHub Profile
@nvkelso
nvkelso / Leaflet.js
Created March 6, 2012 00:51
Use Stamen's map tiles in your favorite mapping library, Leaflet version
// 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);
@nvkelso
nvkelso / ModestMaps.js
Created March 6, 2012 00:49
Use Stamen's map tiles in your favorite mapping library, ModestMaps version
// 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);
@nvkelso
nvkelso / countTiles.py
Created March 1, 2012 22:04 — forked from andrewharvey/countTiles.py
Given a WGS84 bounding box and an OSM tile zoom range calculates a total number of tiles and how much the Amazon Cloud will cost ya.
#!/usr/bin/python
# README
#
# This script is from: https://gist.github.com/1953554
# By Nathaniel Vaughn Kelso and Mike Migurski @ Stamen
#
# Based on script by andrewharvey: https://gist.github.com/1675606
#
# This script should be considered CC0 licensed