-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identify and Time Aware Layers #489
Comments
I also had this same issue with the time slider, the UI for the widget was exactly what I needed but when I identify or query the layer it would return all attributes and not just the time selected. If this ever gets worked out it would be awesome and allow much more flexibility then the out of the box widget provided with WAB. |
I reckon it should be a rather simple thing, but I'm a javascript ignorant too Esri js API among identifyParams has the parameter TimeExtent: https://developers.arcgis.com/javascript/jsapi/identifyparameters-amd.html So (in identify.js) I simply tried to append There is no effect, however, maybe because "this.map.TimeExtent" just is not set or can't be called? I tried to simply include [esri/]TimeExtent into define and function, but failed (it broke the js). The answer is out there, and probably doesn't need much code. |
@Wernazuma Perhaps you have a typo? The |
Thanks, that was one of the problems. Now, the identify works when loading the page! Great step forward. The link to the app is the same as in the initial post by paulanergraz. |
@Wernazuma Instead of setting the identifyParam's
(You might need to create a new TimeExtent instead of just using the one associated with the timeInfo. I don't think so but consider that if the above does not work). |
My parragraph around line 175 reads like this: Also, from how I understand the timeInfo property, it does not help me, since almost all layers have valid data 1701-1808. Or is there something I miss? Consider, in the app, the following layer visible: If you click Monterrey, in Mexico, one entry is valid 1701 through 1778, and another entry is 1779-1808. The plan is that Identify only shows that entry which is in accordance with the set time on the slider. |
@Wernazuma Sorry I do not use time-aware layers so I hope my suggestions do not take you too far into a black hole. ;) Line 175 is the correct location but my code should have used if (layer.ref.timeInfo && layer.ref.timeInfo.timeExtent) {
params.timeExtent = layer.ref.timeInfo.timeExtent;
} I see what you are saying about the layers timeInfo.timeExtent. I thought the values might change based on the time slider. To use the map's timeExtent, I suspect you will need to create a new TimeExtent like this: if (layer.ref.timeInfo && layer.ref.timeInfo.timeExtent) {
params.timeExtent = new TimeExtent(this.map.timeExtent.startTime, this.map.timeExtent.endTime);
} To do that, you'll need to add I would still include the code as written above at line 175 so the timeExtent is only added to time-aware layers. Let me know how it goes. |
@tmcgee : I included esri/TimeExtent and added TimeExtent in function as you said, also setting your As before, it seems to work fine when loading the app but it doesn't survive any change in the time slider. |
You need to remove this at line 230: identifyParams.timeExtent = this.map.timeExtent; It was what you added originally and and is still causing the problem you see now. |
When debugging your code and ignoring line 230, it appears to work as I would expect |
Thank you very much, now it works the way I want it to work. I still need to check with some polygon layers, but I think that our problem is solved. That has been a crucial issue for us! Cheers! |
@tmcgee Thank you for your help |
@Wernazuma @paulanergraz Excellent! I am glad we collectively got it working. I will add this new enhancement to the Identify widget for the next release of cmv. |
I have a Problem with Identify and Time aware Layers.
I use the advanced TimeSlider Widget and It is working fine for the display of the data in the map windows.
But my Problem is that the identify widget shows all the polygons without using the time.
The link to the website
http://46.163.106.182/cmv-app-master/viewer/
If you choose a time and select a layer (good example Capas / Territorios/ Provincias / Provincisa territorios identify brings the result of all polygons (even if you don't see them).
The Screenshot below shows my problem:
I know that it's possible to only show the right data (for example the ESRI WebAppBuilder can do it or other templates) but my javascript is not good enough for this.
Thanks Paul
The text was updated successfully, but these errors were encountered: