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
<script> | |
var map; | |
require(["esri/map", "dojo/domReady!"], function(Map) { | |
map = new Map("mapDiv", { | |
basemap: "topo", | |
center: [-122.45, 37.75], // longitude, latitude | |
zoom: 13 | |
}); | |
map.on('load',function(evt){ |
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
{ | |
"tags" : { | |
"allowUnknownTags" : true | |
}, | |
"plugins" : ["plugins/markdown"], | |
"source": { | |
"excludePattern": "(^|\\/|\\\\)\\." | |
}, | |
"opts" : { | |
"template": "/Users/matt7238/projects/docstrap/template/", |
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
/** | |
* Takes a worker message with a request object as the data member, then sends and recieves result via XHR | |
* @param {Event} evt | |
*/ | |
function sendRequest(evt) { | |
var args = evt.data; | |
var method = args.method; | |
var url = args.url; | |
var options = args.options; | |
var data = options.data; |
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
require(["dojo/_base/declare", "esri/dijit/_EventedWidget"], | |
function(declare, _EventedWidget) { | |
var MyWidget = declare([_EventedWidget], { | |
test: function() { | |
this.emit("ee"); | |
} | |
}); | |
var MyMappedWidget = declare([_EventedWidget], { | |
_eventMap: { | |
"data-ready": ["provider"] |
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
streets --> gray | |
Object {current: Object, previous: Object, target: Object} | |
current: Object | |
basemapName: "gray" | |
infos: Array[2] | |
layers: Array[2] | |
previous: Object | |
basemapName: "streets" | |
infos: Array[1] |
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
/* global require */ | |
require.config({ | |
baseUrl: 'bower_components', | |
shim: { | |
underscore: { | |
exports: '_' | |
}, | |
backbone: { | |
deps: [ |
Copy & save the concatentated AMD modules to a javascript file and include that in your application.
USE AT YOUR OWN RISK
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
Show hidden characters
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, esri jsapi | |
// only including options which differ from the standard default | |
// jshint [options][1] or those in the SublimeText [jshint plugin][2]. | |
// When those 2 default references differ, the option is explictly included | |
// | |
// [1]: https://github.com/jshint/jshint/blob/2.x/examples/.jshintrc | |
// [2]: https://github.com/uipoet/sublime-jshint/blob/master/.jshintrc | |
// -------------------------------------------------------------------- |
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
map2docu = function(evt, props){ | |
var oldName = props[0]; | |
var evtprops = props.slice(1,-1); | |
var desc = props.slice(-1)[0]; | |
console.log('| class="code" | %s \n| class="code" | %s \n| %s. Should be used in favor of %s', | |
evt, evtprops[0] ? evtprops.join(',') : '', desc, oldName); | |
} | |
makeDocu = function(evts) { | |
i=0; |