Select to view content in your preferred language

IdentifyParameters with TimeExtent Usage/Bug?

563
2
Jump to solution
02-10-2022 07:41 AM
EricDurbin
Emerging Contributor

I'm trying to use identify with a time extent and have set it on the IdentifyParameters as shown in the documentation.

let params = new IdentifyParameters();
let timeExtent = new TimeExtent({
start: new Date(Date.UTC(2022, 1, 1)),
end: new Date(Date.UTC(2022, 1, 15))
});

params.timeExtent = timeExtent;
params.geometry = polygon;
params.returnGeometry = false;
params.width = this.view.width;
params.height = this.view.height;
identify.identify(url,params).then(dojo.hitch(this, function(response) {
console.log(response);
}));


I'm getting a javascript error upon execution, it appears it's trying to take the TimeExtent object and do a join(",") against it resulting in an error.


identify.js?v=2.0.1.4:6 Uncaught (in promise) TypeError: k.join is not a function
at Object.g.identifyToIdentifyRESTParameters (identify.js?v=2.0.1.4:6:12)
at identify.js?v=2.0.1.4:4:408


timeExtent: k,
a.time = k ? k.join(",") : null;

It appears this might be a bug, or I'm attempting to call it incorrectly?

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Honored Contributor

Looks like a bug in 4.22. We'll get this fixed for the next release.

View solution in original post

2 Replies
ReneRubalcava
Honored Contributor

Looks like a bug in 4.22. We'll get this fixed for the next release.

ReneRubalcava
Honored Contributor

This should be fixed in our "next" build.

https://github.com/Esri/feedback-js-api-next/

Please test with one of these two methods.

 

// CDN
<script src="https://js.arcgis.com/next/"></script>
// npm
npm install @arcgis/core@next

 

 

0 Kudos