I hereby claim:
- I am davidspriggs on github.
- I am davidspriggs (https://keybase.io/davidspriggs) on keybase.
- I have a public key whose fingerprint is A1F3 7C7A 5041 8EF1 14B6 DF4C C02B 6411 C145 BDB2
To claim this, I am signing this object:
define([ | |
'dojo/_base/declare', | |
'dijit/_WidgetBase', | |
'esri/dijit/Measurement', | |
'gis/dijit/Draw', | |
'dojo/aspect', | |
'dojo/_base/lang', | |
'dojo/dom-construct', | |
'dijit/TitlePane' | |
], function(declare, _WidgetBase, Measurement, Draw, aspect, lang, domConstruct, TitlePane) { |
getStreetView: function(mapPoint) { | |
// location chosen by clicking the left panel button or by using streetview widget | |
dojo.style(this.noStreetViewResults, 'display', 'none'); | |
dojo.style(this.loadingStreetView, 'display', 'inline-block'); | |
if (mapPoint.spatialReference.wkid !== 4326) { | |
var coordinatesToProject = { | |
x: mapPoint.x, | |
y: mapPoint.y | |
}; | |
var fromProjection = this.wkt_26852; |
define([ | |
'esri/InfoTemplate', | |
'esri/units', | |
'esri/geometry/Extent', | |
'esri/config', | |
'esri/tasks/GeometryService', | |
'esri/layers/ImageParameters' | |
], function(InfoTemplate, units, Extent, esriConfig, GeometryService, ImageParameters) { | |
// url to your proxy page, must be on same machine hosting you app. See proxy folder for readme. |
_repositionInfoWin: function(graphic) { | |
// Determine the upper right, and center, coordinates of the map | |
var maxPoint = new esri.geometry.Point(this._map.extent.xmax, this._map.extent.ymax, this._map.spatialReference); | |
var centerPoint = new esri.geometry.Point(this._map.extent.getCenter()); | |
// Convert to screen coordinates | |
var maxPointScreen = this._map.toScreen(maxPoint); | |
var centerPointScreen = this._map.toScreen(centerPoint); | |
var graphicPointScreen = this._map.toScreen(graphic.geometry); // Points only | |
// Buffer | |
var marginLR = 10; |
I hereby claim:
To claim this, I am signing this object:
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Load grunt tasks automatically | |
require('load-grunt-tasks')(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
// use esri_slurp to download api locally. This allows a custom build of the |
hrefContent: { | |
include: true, | |
title: 'hrefContent', | |
id: 'myWidgetID', | |
type: 'titlePane', | |
position: 10, | |
path: 'dijit/layout/ContentPane', | |
options: { | |
href: 'js/gis/dijit/Help/templates/HelpDialog.html', | |
preload: true |
The suggest service does not honor the sourceCountry parameter. This function works to filter results based on a regEx. | |
In post create: | |
this.own(aspect.before(this.geocoder, '_hydrateResults', lang.hitch(this, 'scrubGeocodeAutoComplete'))); | |
member function: | |
scrubGeocodeAutoComplete: function(results) { | |
var re = /United States/i; | |
var scrubedResults = []; |
/* This patch should be removed at JSAPI 3.8 */ | |
require([ | |
"dojo/_base/lang", | |
"dojo/Deferred", | |
"esri/dijit/Directions" | |
], function(lang, Deferred, Directions){ | |
Directions.prototype._getCandidate = function(stop, index) { | |
var def = new Deferred(); | |
var stopType = typeof stop; | |
var emptyStop = { |
/*global dojoConfig */ | |
define(function() { | |
var cb = '_asyncApiLoaderCallback'; | |
return { | |
load: function(param, req, loadCallback) { | |
if (!cb) { | |
return; | |
} else { | |
dojoConfig[cb] = function() { | |
delete dojoConfig[cb]; |