Skip to content

Instantly share code, notes, and snippets.

@swingley
swingley / index.html
Last active August 29, 2015 14:26
Rivers
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<style>
#map { height:500px; } #mundi-link { position: absolute; right: 5px; z-index: 200; }
</style>
<?xml version="1.0" encoding="UTF-8"?><response code="1"><collection name="Pointe" count="418" country="US" radius="4000" radiusuom="mile" centerpoint="-100.00000118858782,40.00164381694018" state="Kansas" city="Norton" address="Road A" province="" postalcode="67654"><poi>
<name>Trader Joe's Lincoln (722)</name>
<_distance>182.24</_distance>
<_distanceuom>mile</_distanceuom>
<address1>3120 Pine Lake Rd</address1>
<address2>Ste R</address2>
<beer>Yes</beer>
<city>Lincoln</city>
<clientkey>722</clientkey>
<comingsoon></comingsoon>
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
@swingley
swingley / index.html
Created July 26, 2013 17:21
load class breaks renderer from a map on arcgis.com, build boxes from map clicks and use class breaks renderer to symbolize boxes
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="//js.arcgis.com/3.6/js/esri/css/esri.css">
<style>
html, body, #map {
@swingley
swingley / index.html
Created July 26, 2013 16:49
get simple renderer from a map on arcgis.com, use it to symbolize map click points
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="//js.arcgis.com/3.6/js/esri/css/esri.css">
<style>
html, body, #map {
@swingley
swingley / index.html
Created July 26, 2013 16:48
simple renderer to and from json comparison
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<style>
body {
@swingley
swingley / dojoConfig-paths-vs-packages.js
Created June 21, 2013 17:36
dojoConfig.packages vs. dojoConfig.paths
// helpful for understanding dojoConfig.packages vs. dojoConfig.paths:
// http://www.sitepen.com/blog/2013/06/20/dojo-faq-what-is-the-difference-packages-vs-paths-vs-aliases/
var dojoConfig = {
paths: {
extras: location.pathname.replace(/\/[^/]+$/, "") + "/extras"
}
var dojoConfig = {
packages: [{
"name": "extras",
@swingley
swingley / gist:5807614
Created June 18, 2013 17:43
Bookmarklet to go from github pages to associated repo.
javascript:(function() {var w=window.location;window.location="https://github.com/"+w.hostname.split(".")[0]+"/"+w.pathname.split("/")[1];})();
@swingley
swingley / index.html
Created February 27, 2013 19:06
Nice Nice JPG! in an esri JS API map popup.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Nice Nice Popup</title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css">
<style>
html, body, #map {
@swingley
swingley / index.html
Last active December 14, 2015 07:29
Nice Nice JPG! in an esri js api map popup.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Nice Nice Popup</title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css">
<style>
html, body, #map {