Skip to content

Commit

Permalink
Merge pull request #549 from cmv/feature/add-time-extent-to-identify-…
Browse files Browse the repository at this point in the history
…widget

Add a TimeExtent to the Identify Parameters when appropriate.
  • Loading branch information
DavidSpriggs committed Apr 26, 2016
2 parents 0bdc6c0 + 6e1122f commit 57815f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion viewer/js/gis/dijit/Identify.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ define([
'esri/tasks/IdentifyTask',
'esri/tasks/IdentifyParameters',
'esri/dijit/PopupTemplate',
'esri/TimeExtent',
'dojo/text!./Identify/templates/Identify.html',
'dojo/i18n!./Identify/nls/resource',

'dijit/form/Form',
'dijit/form/FilteringSelect',
'xstyle/css!./Identify/css/Identify.css'
], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, MenuItem, lang, array, all, topic, query, domStyle, domClass, Moveable, Memory, IdentifyTask, IdentifyParameters, PopupTemplate, IdentifyTemplate, i18n) {
], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, MenuItem, lang, array, all, topic, query, domStyle, domClass, Moveable, Memory, IdentifyTask, IdentifyParameters, PopupTemplate, TimeExtent, IdentifyTemplate, i18n) {

return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
widgetsInTemplate: true,
Expand Down Expand Up @@ -181,6 +182,9 @@ define([
var params = lang.clone(identifyParams);
params.layerDefinitions = layer.ref.layerDefinitions;
params.layerIds = layerIds;
if (layer.ref.timeInfo && layer.ref.timeInfo.timeExtent && this.map.timeExtent) {
params.timeExtent = new TimeExtent(this.map.timeExtent.startTime, this.map.timeExtent.endTime);
}
identifies.push(layer.identifyTask.execute(params));
identifiedlayers.push(layer);
}
Expand Down

0 comments on commit 57815f3

Please sign in to comment.