Skip to content

Commit

Permalink
New config example to search for a value provided in the app's url.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgee committed Apr 13, 2015
1 parent e0e381b commit 96f3d2a
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions config/queryStringSearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
define([
'dojo/io-query'
], function (ioQuery) {

var uri = window.location.href;
var qs = uri.substring(uri.indexOf('?') + 1, uri.length);
var qsObj = ioQuery.queryToObject(qs);
var fips = qsObj.fips || '';

return {
isDebug: false,

mapOptions: {
basemap: 'streets',
center: [-96.59179687497497, 39.09596293629694],
zoom: 5,
sliderStyle: 'small'
},

panes: {
left: {
collapsible: false,
style: 'display:none'
},
bottom: {
id: 'sidebarBottom',
placeAt: 'outer',
splitter: true,
collapsible: true,
region: 'bottom',
style: 'height:200px;',
content: '<div id="attributesContainer"></div>'
}
},

operationalLayers: [
],

widgets: {
growler: {
include: true,
id: 'growler',
type: 'domNode',
path: 'gis/dijit/Growler',
srcNodeRef: 'growlerDijit',
options: {}
},
attributesTable: {
include: true,
id: 'attributesContainer',
type: 'domNode',
srcNodeRef: 'attributesContainer',
path: 'widgets/AttributesTable',
options: {
map: true,
mapClickMode: true,

// use a tab container for multiple tables or
// show only a single table
useTabs: false,

// used to open the sidebar after a query has completed
sidebarID: 'sidebarBottom',

tables: [
{
title: 'Census',
topicID: 'censusQuery',
queryOptions: {
queryParameters: {
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/4',
where: 'FIPS = \'' + fips + '\''
},
idProperty: 'ObjectID'
},
toolbarOptions: {
show: false
}
}
]
}
}
}
};
});

0 comments on commit 96f3d2a

Please sign in to comment.