A look at Queue.js and how you can load multiple files before running the rest of the code. Simple visualization of populated places in the USA. Files loaded:
- US States - topojson
- Populated Places - geojson
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else | |
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
if (i == key && obj[i] == val || i == key && val == '') { // |
$(function(){ | |
var formUrl = '/* ex: https://docs.google.com/a/developmentseed.org/spreadsheet/formResponse?formkey=... */'; | |
// Set up map | |
var m = mapbox.map('map').addLayer(mapbox.layer().id(' /* mapbox-account.id */ ')); | |
// Set up map ui features with point selector | |
var ui = mapbox.ui().map(m).auto().pointselector(function(d) { | |
// Remove all points except the most recent |
#!/usr/bin/env python | |
''' | |
Usage: | |
# edit the script below "main" then: | |
python bbox2csv.py > bounds.csv | |
''' | |
def bbox2wkt(minx, miny, maxx, maxy): |
# Bulk convert shapefiles to geojson using ogr2ogr | |
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/ | |
# Note: Assumes you're in a folder with one or more zip files containing shape files | |
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere) | |
#geojson conversion | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} |
A look at Queue.js and how you can load multiple files before running the rest of the code. Simple visualization of populated places in the USA. Files loaded:
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet.draw Plugin</title> | |
<meta charset="utf-8" /> | |
<link | |
rel="stylesheet" | |
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" | |
/> | |
<link |
CSW (Catalogue Service for the Web) is an `OGC (Open Geospatial Consortium)`_ specification that defines common interfaces to discover, browse, and query metadata about data, services, and other potential resources.
Based on copy of https://gist.github.com/kalxas/5ab6237b4163b0fdc930 on 20 June 2014 12:27 UTC |
DSO.Views = DSO.Views || {}; | |
(function() { | |
DSO.Views.BlogList = function(opts) { | |
this.container = opts.container; | |
var _posts = []; | |
var _self = this; | |
var _template = JST['card-list.ejs']; | |
var _perPage = 9; |