Skip to content

Instantly share code, notes, and snippets.

😎
Hubbin it up @ Esri

Dave Bouwman dbouwman

😎
Hubbin it up @ Esri
Block or report user

Report or block dbouwman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dbouwman
dbouwman / webmap.json
Created Aug 27, 2015
Drought Outlook
View webmap.json
{
"item": {
"title": "New Map",
"snippet": "Drought Outlook",
"extent": [
[
-110.79999999997013,
-68.88163488885452
],
[
@dbouwman
dbouwman / webmap.json
Created Aug 27, 2015
Drought Outlook
View webmap.json
{
"item": {
"title": "New Map",
"snippet": "Drought Outlook",
"extent": [
[
-181.1116496836007,
-18.35790289352071
],
[
@dbouwman
dbouwman / index.html
Last active Aug 27, 2015
Drought_Exposure_Area_District
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href=
"https://rawgit.com/benheb/legend/master/legend.css">
@dbouwman
dbouwman / map-control-view.js
Created Feb 7, 2014
Map Controls view with calls to log the event
View map-control-view.js
Composer.module('MapBarModule.Controls', function (Controls, App, Backbone, Marionette, $, _) {
//Controls item view
Controls.View = Backbone.Marionette.ItemView.extend({
model: Controls.Model,
template: 'mapbar/controls/controls_view',
className: 'mapbar-controls',
events: {
"click .type": "_changeBasemap"
},
@dbouwman
dbouwman / took.js
Created Feb 7, 2014
Took.js performance timer
View took.js
/**
* Took.js
* Simple Timer object that can persist itself to
* Google Analytics, custom logging backend
* or just the console.
* Depends on jQuery
* @param {object} options Options hash
*/
var Took = function(options){
//
@dbouwman
dbouwman / model-fetch.js
Created Feb 7, 2014
Snipped of a model where we add timing code around an xhr
View model-fetch.js
...
fetch: function(){
var url = this.get('url');
var self = this;
//start the timer
App.startTimer('dataset-fetch', 'ajax', 'Dataset: ' + this.get('id'));
//closure for the callback
var doneCB= function(data){
self.loadFromJson(data);
//stop the timer
@dbouwman
dbouwman / Coverage.txt
Last active Aug 29, 2015
Code Coverage Report
View Coverage.txt
Running "jshint:files" (jshint) task
>> 190 files lint free.
Running "jasmine:alltests" (jasmine) task
Testing jasmine specs via phantom
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
View gist:9818381
[2014-03-27 14:50:08 -0600] Parameters: {"title"=>"Fort Collins Open Data", "subdomain"=>"ftc", "external_url"=>"ftc.dev", "public"=>true, "group_ids"=>["81c5fe2b6410459dad76b0476ab3124a", "743a134d094a4cebb7ac11de4b360875", "e924622f3f924405aa8eac76248fc53d", "8a87b8ae55494de08cda88ffcd7490eb", "c84f48cecf924abdb25ee39247bbe673", "fa3fd4d54c794f188f921f3aa6336ce9", "fc8fda59e5ec4eca996412f25f50185a", "45fd7cd699114b09865d06b4159c4547"], "header_objects"=>"[{\"header_text\":\"Fort Collins Open Data\",\"header_image_url\":\"http://placehold.it/150x24\"}]", "footer_html"=>"\n <div class=\"row\">\n \n <div class=\"column-8\">\n <h3 id=\"connect\">Connect</h3>\n<ul>\n<li><a href=\"http://www.fcgov.com/gis/\">Fort Collins GIS</a></li>\n<li><a href=\"http://www.larimer.org/maps/\">Larimer County</a></li>\n</ul>\n\n\n </div>\n \n <div class=\"column-16 last\">\n <h3 id=\"developers\">Developers</h3>\n<ul>\n<li><a href=\"http://www.fcgov.com/gis/\">Fort Collins GIS</a></li>\n<li>
@dbouwman
dbouwman / Controller.spec.js
Last active Aug 29, 2015
Controller Spec Example
View Controller.spec.js
describe('Dataset Show Controller', function () {
describe('fresh load', function () {
var noOp = function(){};
beforeEach(function() {
//get dataset from json
json = getJSONFixture('modules/datasets/show/inlined-dataset.json');
//setup the app options
var appOptions = {
baseUrl: 'http://localhost:3000',
environment: 'unit-test',
@dbouwman
dbouwman / gist:10745170
Created Apr 15, 2014
Yeoman Scaffolding for Fun and Profit
View gist:10745170
Writing web apps from scratch is so 20013! Unable to ween the industry off their "need-this-yesterday" mentality, today's web developers need to seek productivity wherever they can find it, and the yeoman + grunt + bower triumvirate are here to help!
In this talk I will review a scaffolder that generates a solid project foundation for responsive web map applications. It builds out:
- Leaflet + mapController to provide geo-services
- Twitter Bootstrap
- Backbone + Marionette for application structure
- jshint for all your linting needs
- Jasmine for unit testing
- istanbul for code-coverage
You can’t perform that action at this time.