Skip to content

Instantly share code, notes, and snippets.

@asizer
asizer / index.html
Last active September 8, 2015 17:41
Portal error handling
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Portal Error Handling</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
<style>
html,
@asizer
asizer / index.html
Last active August 26, 2015 20:59
Search widget events and country-limiting
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Basic Search Widget</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
<style>
@asizer
asizer / index.html
Last active September 2, 2015 18:57
Layer Item symbology
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Changed Layer Symbology</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css">
<style>
@asizer
asizer / index.html
Last active September 3, 2015 21:19
Layer order of differently shared layers in webmap
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>WebMap with restricted and unrestricted layers</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css">
<style>
@asizer
asizer / carspecs.csv
Last active October 5, 2015 13:10
Knight course Module 2: logging data
make model style year length width height
Honda Civic Sedan 1995 173 66.9 51.7
Honda Civic Sedan 1996 175.1 67.1 54.7
Honda Civic Sedan 1997 175.1 67.1 54.7
Honda Civic Sedan 1998 175.1 67.1 54.7
Honda Civic Sedan 1999 175.1 67.1 54.7
Honda Civic Sedan 2000 175.1 67.1 54.7
Honda Civic Sedan 2001 174.6 67.5 56.7
Honda Civic Sedan 2002 174.6 67.5 56.7
Honda Civic Sedan 2003 174.6 67.5 56.7
@asizer
asizer / car-bars.js
Last active October 5, 2015 13:20
Knight course module 3: Bar Chart
/* global colorbrewer */
// lots of global variables...
// dimensions and elements
var margins, svgW, svgH, chartW, chartH, svg, chartG;
// scales, formatters, and axes
var xScale, yScale, colorScale, yAxis, parseDate;
@asizer
asizer / car-bars2.js
Last active October 5, 2015 13:38
Knight course Module 4: bar chart with axes
/* global colorbrewer */
// lots of global variables...
// dimensions and elements
var margins, svgW, svgH, chartW, chartH, svg, chartG;
// scales, formatters, and axes
var xScale, yScale, colorScale, xAxis, yAxis, parseDate;
@asizer
asizer / cars-scatter.js
Created October 5, 2015 13:43
Knight course module 5: scatter plot
/* global colorbrewer */
// lots of global variables...
// dimensions and elements
var margins, svgW, svgH, chartW, chartH, svg, chartG;
// scales, formatters, and axes
var xScale, yScale, colorScale, xAxis, yAxis, parseDate;
@asizer
asizer / cars-scatter.js
Created October 5, 2015 13:46
Knight course module 5b: Scales starting at 0
/* global colorbrewer */
// lots of global variables...
// dimensions and elements
var margins, svgW, svgH, chartW, chartH, svg, chartG;
// scales, formatters, and axes
var xScale, yScale, colorScale, xAxis, yAxis, parseDate;
@asizer
asizer / cars-time.js
Last active October 5, 2015 13:57
Knight Course module 6: graph over time
/* global colorbrewer */
// lots of global variables...
// dimensions and elements
var margins, svgW, svgH, chartW, chartH, svg, chartG, carsG;
// scales, formatters, and axes
var xScale, yScale, xAxis, yAxis, formatDate, parseDate;