identifyTask error when using timeExtent

1034
3
02-18-2011 07:44 AM
PatKeegan
Occasional Contributor
I have an identifyTask that works fine until I add a TimeExtent to the identifyParams.

The map service is time aware and a time aware query task works on individual layers.

Does the identifyTask support a timeExtent?

thanks,

error:
Uncaught TypeError: Object 1293210666416 has no method 'getTime'

.....
identifyParams.timeExtent = timeDef;
identifyTask.execute(identifyParams, function(idResults) { addToMapID(idResults, evt); });
0 Kudos
3 Replies
derekswingley1
Frequent Contributor
Yes, it works. I've used a time extent returned by getCurrentTimeExtent() from a time slider to set the timeExtent property on an identify parameters object. How are you creating your time extent?
0 Kudos
PatKeegan
Occasional Contributor
Thanks Derek!

Got it working, I did not have my global timeExtent updating properly.


myTimeExtent = timeSlider.getCurrentTimeExtent();
dojo.connect(timeSlider, "onTimeExtentChange", function(timeExtent) {
  myTimeExtent = timeSlider.getCurrentTimeExtent();
  console.log("time extent changed");
});
0 Kudos
HeidiOgle
New Contributor
Edit: cancel that, figured it out.  Cheers!
0 Kudos