Skip to content

Instantly share code, notes, and snippets.

View tmcw's full-sized avatar
💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
View GitHub Profile
{ _type: 'OpenLayers.Layer.StyleWriter'
, _value:
[ 'Support US drone strikes'
, 'http://ndi1.live.mapbox.com/tile/${mapfile}/${z}/${x}/${y}.${format}'
, { projection: [Object]
, maxExtent: [Object]
, type: 'png'
, symbolizer: 'polygon'
, value_field: 'date'
, name_field: 'assumed_target'
@tmcw
tmcw / gist:784674
Created January 18, 2011 16:20 — forked from ajashton/gist:784671
/* River lines */
.river::line { color: #acf; }
/* I am guessing as to the meaning of the CLASS column.
* This style appears mostly correct */
.river::line[zoom=7][CLASS=1] { width: 0.1; }
.river::line[zoom=8][CLASS=1] { width: 0.2; }
.river::line[zoom=9][CLASS=1] { width: 0.4; }
var makeMaps = function () {
var mm = com.modestmaps;
m = new mm.Map('map', new com.modestmaps.WaxProvider({
baseUrl: 'http://a.tiles.mapbox.com/mapbox/',
layerName: 'world-glass',
zoomRange: [4, 8]
}));
m.setCenterZoom(
new com.modestmaps.Location(37, -97), 5);
@tmcw
tmcw / api.md
Created September 30, 2011 15:49 — forked from yhahn/api.md
API sketch

Root

api.tiles.mapbox.com/v1/

Albums

api.tiles.mapbox.com/v1/albums.json
api.tiles.mapbox.com/v1/albums.jsonp
@tmcw
tmcw / index.html
Created October 30, 2011 06:15 — forked from wboykinm/gls.html
MultiLayer Wax.G Switcher
<html>
<head>
<title>Wax.G Layer Switcher</title>
<script src='http://maps.google.com/maps/api/js?sensor=false' type='text/javascript'></script>
<script src='http://www.geosprocket.com/mapbox-wax/dist/wax.g.js' type='text/javascript'></script>
<script src='http://code.jquery.com/jquery-1.6.4.min.js' type='text/javascript'></script>
<link href='http://www.geosprocket.com/css/basic.css' rel='stylesheet' type='text/css' />
<link href='http://www.geosprocket.com/css/buttons.css' rel='stylesheet' type='text/css' />
<link href='http://www.geosprocket.com/mapbox-wax/theme/controls.css' rel='stylesheet' type='text/css' />
@tmcw
tmcw / index.html
Created December 20, 2011 19:26
Base leaflet.js template
<html>
<head>
<script src='https://raw.github.com/mapbox/wax/master/ext/leaflet.js' type='text/javascript'></script>
<script src='https://raw.github.com/mapbox/wax/master/dist/wax.leaf.js' type='text/javascript'></script>
<link href='https://raw.github.com/mapbox/wax/master/ext/leaflet.css' rel="stylesheet" type="text/css" />
<link href='https://raw.github.com/mapbox/wax/master/theme/controls.css' rel="stylesheet" type="text/css" />
<style type='text/css'>
#map-div {
width:500px;
height:300px;
@tmcw
tmcw / index.html
Created January 22, 2012 18:07 — forked from MateoV/index.html
Layer Switcher Example
<html>
<head>
<title>Tornadoes in the U.S.</title>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script>
<script src='http://mapbox.com/wax/dist/modestmaps.js' type='text/javascript'></script>
<script src='http://mapbox.com/wax/dist/wax.mm.min.js' type='text/javascript'></script>
<link href='http://mapbox.com/wax/css/controls.css' rel='stylesheet' type='text/css' />
</head>
<body>
<div id="sidebar">
@tmcw
tmcw / custom-interaction.js
Created March 12, 2012 17:24 — forked from tristen/custom-interaction.js
Custom wax formatter
var mm = com.modestmaps;
var url = 'http://api.tiles.mapbox.com/v3/tristen.map-h7dkbvxx.jsonp';
// ## Map Implementation
wax.tilejson(url, function(tilejson) {
// By default, MapBox hosting provides
// templating markup in uploaded .mbtiles.
// In wax we want to remove template object
// so we can default to tilejson.formatter instead.
@tmcw
tmcw / index.html
Created March 21, 2012 21:00 — forked from javisantana/map.html
modest map problem
<!DOCTYPE html>
<html>
<head>
<title>Modest Maps JS</title>
<script type="text/javascript" src="https://raw.github.com/stamen/modestmaps-js/master/modestmaps.js"></script>
<script type="text/javascript">
var map;
function initMap() {
// some test
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Wax Interactivity</title>
</head>
<body>
<style>
#map {
width: 100%;