Skip to content

Instantly share code, notes, and snippets.

View driskull's full-sized avatar
:shipit:

Matt Driscoll driskull

:shipit:
View GitHub Profile
@jgravois
jgravois / gist:8404339
Last active January 13, 2016 18:59
this is a gist to remind john and matt how to query for the maximum value in a field manually (since the JS api doesnt have any tools to limit query results)
use outStatistics
http://services.arcgis.com/OfH668nDRN7tbJh0/arcgis/rest/services/My_Walks/FeatureServer/0/query?where=1%3D1&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&geohash=&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Meter&outFields=&returnGeometry=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&returnDistinctValues=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=%5B%7B%0D%0A++++%22statisticType%22%3A+%22max%22%2C%0D%0A++++%22onStatisticField%22%3A+%22WHEN%22%0D%0A%7D%5D&resultOffset=&resultRecordCount=&returnZ=false&returnM=false&quantizationParameters=&f=pjson&token=
// not the old hack you used with driskull
FIELD=(SELECT MAX(FIELD) FROM TABLE)
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3/query?where=POP2007=(SELECT MAX(POP2007) FROM states)&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIn
@mpriour
mpriour / .jshintrc
Last active November 2, 2016 15:46
JSHint Options for esri JSAPI development
{
// --------------------------------------------------------------------
// 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
// --------------------------------------------------------------------