Skip to content

Instantly share code, notes, and snippets.

View bsudekum's full-sized avatar
👋

Bobby Sudekum bsudekum

👋
View GitHub Profile
@bsudekum
bsudekum / Interact.txt
Created May 24, 2012 02:23
Files for TileMill Interactivity Example
<h5 style="text-align:center;">U.S. Crime Rates</h5>
<img src="http://chart.apis.google.com/chart?chbh=a,5,15&chs=300x150&cht=bvg&chco=4D89F9,000000,FF9900&chd=t:{{{murder and}}}|{{{robbery ra}}}|{{{forcible r}}}&chdl=Muder|Robbery|Forcible+Rape" width="300" height="150" alt="" />
@bsudekum
bsudekum / Create PhoneGap Project
Created September 11, 2012 02:17
PhoneGap Create
./create <project_folder_path> <package_name> <project_name>
Example:
./create ~/Documents/Projects/phonegap/MeatText com.MeatText MeatText
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Layers Control Example</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.js"></script>
@bsudekum
bsudekum / index.html
Created September 20, 2012 16:05
OSM Bike Only Layer
<!DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.5/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.5/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
@bsudekum
bsudekum / gist:3773851
Created September 24, 2012 02:16
Hypem Map
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Quick Start Guide Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css" />
<!--[if lte IE 8]>
@bsudekum
bsudekum / gist:3790626
Created September 26, 2012 21:13
WMS Google
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Quick Start Guide Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css" />
@bsudekum
bsudekum / gist:3943384
Created October 24, 2012 02:36
Creative Morning Map Tutorial
How I generated the Creative Mornings map. Example here: http://visuallybs.com/creative/
1. Create a new project in photoshop with a 2px x 2px canvas.
2. Make 1 of the 4 pixels black
3. Save this as a png.
4. Open Tilemill.
5. Using the carto command 'polygon-pattern-file' select the polygon you would like to replace with the png you just generated in PS. This gives the polygon a pixelated/dot look.
6.Export your map as mbtiles.
7. Upload to mapbox.com and embed or map or....
@bsudekum
bsudekum / gist:4611406
Created January 23, 2013 18:39
Backbone Stuff
Map = Backbone.Model.extend({
initialize:function(mapUnits) {
console.log("init maps : "+mapUnits.id);
console.log("init maps : "+mapUnits.maxzoom);
}
});
mapList = Backbone.Collection.extend({
model: Map,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<script type="text/javascript" src="cordova-2.4.0.js"></script>
@bsudekum
bsudekum / gist:5049036
Created February 27, 2013 16:05
Adds comma into numbers
$.fn.digits = function(){
return this.each(function(){
$(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") );
})
}