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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tmcw
tmcw / data.csv
Created September 1, 2015 15:44 — forked from anonymous/data.csv
/dev/chartpipe
o size
clipper.o 99285
csscolorparser.o 15870
sprite_image.o 1249
sprite_parser.o 30229
sprite_store.o 5905
circle_buffer.o 587
collision_box_buffer.o 675
debug_font_buffer.o 5583
elements_buffer.o 864
{ _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.