Skip to content

Instantly share code, notes, and snippets.

View awoodruff's full-sized avatar

Andy Woodruff awoodruff

View GitHub Profile
@awoodruff
awoodruff / gist:6070584
Last active December 20, 2015 04:28
Rotating globe tween from http://work.axismaps.com/amd/gc/oil/. See it in action there by mousing over the bar chart. Code more or less ripped from examples like http://bl.ocks.org/mbostock/4183330, but on IE9 and IE10, especially on slower machines, countries that are supposed to rotate to the back of the globe and disappear have a tendency to …
// map is at http://work.axismaps.com/amd/gc/oil/
function move_globe( coords, animate, end )
{
if ( insetShowing ) return;
if( animate )
{
coords[ 1 ] = coords[ 1 ] > 30 ? 30 :
coords[ 1 ] < -30 ? -30 :
coords[ 1 ];
@awoodruff
awoodruff / index.html
Last active September 30, 2019 22:59
State lines
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#states path {
fill: none;
}
</style>
@awoodruff
awoodruff / README.md
Last active June 1, 2018 20:05
Projection face!
@awoodruff
awoodruff / README.md
Created April 14, 2014 19:56
topojson.presimplify

Testing the topojson.presimplify function that is used in Dynamic Simplification examples. It's included in this stripped-down example just for testing purposes: seems to work like a charm in most browsers but for a topojson file with much detail (like the county map here), Firefox chokes on topojson.presimplify.

@awoodruff
awoodruff / README.md
Created April 14, 2014 20:27
topojson.presimplify

Testing the topojson.presimplify function that is used in Dynamic Simplification examples. It's included in this stripped-down example just for testing purposes: seems to work like a charm in most browsers but for a topojson file with much detail (like the county map here), Firefox chokes on topojson.presimplify.

@awoodruff
awoodruff / counties.json
Created April 15, 2014 17:19
topojson 1.6.8 presimplify
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@awoodruff
awoodruff / README.md
Created April 15, 2014 17:29
D3 map tiles + dynamic simplification
@awoodruff
awoodruff / index.html
Last active February 23, 2023 11:49
Basic Leaflet map
<html>
<head>
<title>A Leaflet map!</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<style>
#map{ width: 900px; height: 500px; }
</style>
</head>
<body>
@awoodruff
awoodruff / index.html
Created September 16, 2014 01:25
Leaflet map with two tile layers
<html>
<head>
<title>A Leaflet map!</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<style>
#map{ height: 100% }
</style>
</head>
<body>
@awoodruff
awoodruff / index.html
Last active April 18, 2018 04:40
Leaflet: basic #ratmap
<html>
<head>
<title>A Leaflet map!</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<style>
#map{ height: 100% }
</style>
</head>