Skip to content

Instantly share code, notes, and snippets.

@ebrelsford
ebrelsford / index.html
Created December 10, 2013 22:17
Trying to embed a MapBox map with a legend, forcing the legend parameter. This version has "legend" in the iframe's src attribute.
<!doctype html>
<html>
<body>
<iframe width='100%' height='500px' frameBorder='0' src='https://a.tiles.mapbox.com/v3/ebrelsford.gghlfpek/mm/zoompan,legend,zoomwheel.html?secure=1#12/30.0273/-90.0156'></iframe>
</body>
</html>
@ebrelsford
ebrelsford / lots.geojson
Last active December 31, 2015 20:39
A geojson file uploaded directly to Gist.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ebrelsford
ebrelsford / map.geojson
Created December 19, 2013 16:28
A geojson file uploaded directly to Gist
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Testing</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.6.2/leaflet.js"></script>
<link rel="stylesheet" href="https://rawgithub.com/ebrelsford/Leaflet.loading/master/src/Control.Loading.css" />
<script src="https://rawgithub.com/ebrelsford/Leaflet.loading/master/src/Control.Loading.js"></script>
@ebrelsford
ebrelsford / index.html
Created February 8, 2014 22:39
Example of Leaflet.loading not working when adding a layer
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<link rel="stylesheet" href="https://rawgithub.com/ebrelsford/Leaflet.loading/master/src/Control.Loading.css" />
@ebrelsford
ebrelsford / pg2geojson.sh
Created March 6, 2014 00:39
Use ogr2ogr to get data from a PostGIS database as GeoJSON
$ ogr2ogr -f GeoJSON data.geojson \
PG:"dbname='dbname' user='dbuser' password='dbpassword' host='dbhost'" \
-sql "SELECT id, geometry from table_name where geometry is not null"
@ebrelsford
ebrelsford / index.html
Created April 25, 2014 16:22
Leaflet with styled GeoJSON points
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Load jQuery -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<!-- Load Leaflet -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
@ebrelsford
ebrelsford / overpass.geojson
Last active August 29, 2015 14:09 — forked from anonymous/overpass.geojson
NYC community garden data in OSM
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
#bob {
background-color: blue;
height: 50px;
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.window {
border: 1px solid black;
height: 200px;