A demo of TopoJSON on a U.S. counties shapefile from the U.S. census bureau. The same TopoJSON file can also be used to show states.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
O:\Workspace\Nick\Public Works\Citizen Engagement\nodejs>node server.js | |
O:\Workspace\Nick\Public Works\Citizen Engagement\nodejs\node_modules\geoservice | |
s\lib\featureservice.js:61 | |
this.get(); | |
^ | |
TypeError: Object #<Geoservices> has no method 'get' | |
at Geoservices.FeatureService (O:\Workspace\Nick\Public Works\Citizen Engage | |
ment\nodejs\node_modules\geoservices\lib\featureservice.js:61:8) | |
at Object.<anonymous> (O:\Workspace\Nick\Public Works\Citizen Engagement\nod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "2013 Contribution Totals", | |
"children" : [ | |
{ | |
"rID" : "0194b2d1d3db739c1ef2144a7754f890", | |
"name" : "WA ST NATL ORG FOR WOMEN PAC", | |
"year" : 2013, | |
"amount" : 10 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<style> | |
.node circle { | |
fill: rgba(220,80,255,1); | |
stroke: rgba(147,2,183,1); | |
stroke-width: 3px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Collapsible Tree Example</title> | |
<style> | |
.node circle { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
fs.open('CW.tif', 'r', function(err, fd) { | |
var buf = new Buffer(100); | |
fs.read(fd, buf, 0, 100, null, function(err, bytesRead, buffer) { | |
var head = buffer.slice(0, 100).toString(); | |
if((head.slice(0,2).toString() === 'II' || head.slice(0,2).toString() == 'MM') && ((buffer[2] === 42) || buffer[3] === 42)) { | |
console.log('file matches GeoTiff'); | |
} else { | |
console.log('head-slice is ', head.slice(0,2).toString(), ' and buffer[2] equals ', buffer[2], ' and buffer[3] equals ', buffer[3]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url=http://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/ZZZ/YYY/XXX | |
minzoom=8 | |
maxzoom=17 | |
type=google | |
format=jpg | |
bounds=-122.330832,47.640989,-122.283883,47.662931 | |
defaultzoom=15 | |
mbtiles=defaulttiles/_naip-tile.mbtiles | |
description=USGS Ortho and Satellite Imagery |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert -size 256x256 -background "rgb(204,204,204)" -fill white -font "Century-Gothic-Bold-Italic" -pointsize 18 -gravity Center caption:"Map data not available. \n\nPlease zoom out or switch to a different basemap." missing.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.5/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.5/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
OlderNewer