Select to view content in your preferred language

Using pop-up windows with time aware layers for identify

468
3
05-25-2011 11:30 PM
KristelMeikas
Emerging Contributor
Hello,

I have an application with several time aware layers for which I need to enable identify functionality. Has anyone else tried using pop-up windows with TimeWidget and got the correct behaviour - by correct I mean that identifiable features depend on the time "selected" in the TimeWidget?

Currently I always seem to get a pop-up for the earliest data for a feature (features in the layer cover the whole subject area as a grid of polygons based on measurement data received at specified intervals). I'm guessing that (if there isn't a solution built in which I haven't found) I should dynamically add a definition expression to the identify task at runtime based on the time selected in TimeWidget? But what about when TimeWidget is closed - how do I determine which hour to show results for? Or is there another better solution to this issue?

Thanks in advance,
Kristel
Tags (2)
0 Kudos
3 Replies
NicoleSulzberger
Regular Contributor
Hi Kristel

Have you resolved your problem, and if yes, what was the problem? It looks like I have the same problem in my application. I set the first date of the time parameter to a certain date, but the feature I get back was valid much earlier, and not valid at this date. I am calling the Identify Task programmatically, and I am not using the time slider. Some of my layers are time-aware, others aren't.

bye, Nicole
0 Kudos
KristelMeikas
Emerging Contributor
Hi Nicole,

I didn't actually find out what the problem was, but the way I solved it was by using Robert Scheitlin's Identify Widget with small additions to the identifyFeatures method in IdentifyWidget.mxml:
if (map.timeExtent != null)
 identifyParams.timeExtent = new TimeExtent(map.timeExtent.endTime, map.timeExtent.endTime);

In our case I only needed to show data from the exact instant chosen on the time slider, not a time span, that's why I used only the time slider end time for creating a new time extent for the identify parameters.

You might also want to play a bit with timezones in the map document and service, because for a while we had an issue with UTC and local timezone differences - unfortunately, I don't have the map service anymore to check how exactly we got over that.

Hope that helps,
Kristel
0 Kudos
NicoleSulzberger
Regular Contributor
Hi Kristel

Thank you very much for your response. We are only using a tim3 and not a time extent, so we'll try to set both times of the extent instead of just one, maybe that will help.

bye, Nicole
0 Kudos