AnsweredAssumed Answered

Time extent on MapView not working as expected with ArcGISMapImageLayer and IdentifyLayerAsync

Question asked by matus on Jan 8, 2019
Latest reply on Mar 16, 2019 by matus

I have few questions about TimeExtent property of MapView.

 

I have a little testing sample (solution is enclosed) with esri map services. The layer in question is this one:
https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/1
The layer has Start Time Field and End Time Field.

 

When I set TimeExtent on MapView like this:

 

DateTime date = new DateTime(2005, 9, 1);
DateTime endDate = new DateTime(2005, 9, 30);
TimeExtent tExtent = new TimeExtent(date, endDate);
this._mapView.TimeExtent = tExtent;

 

I can see features that have start time date and end time date between specified interval. If I click on map and call MapView.IdentifyLayerAsync on ArcGISMapImageLayer I get response and result line features are highlighted. So far, this is working as expected.

 

The issue arrise when I set TimeExtent on Map like this:

 

DateTime now = new DateTime(2005, 9, 17);
TimeExtent extent = new TimeExtent(now);
this._mapView.TimeExtent = extent;

 

With this time extent I can see only one feature. When I click on that feature and call IdentifyLayerAsync I get no results in code, the IdentifyLayerResult is empty, however I can see the request in Fiddler and it has response with one feature. So the response from web request is correct, but identify result in runtime .net api is empty. So my questions are:

 

1. Why there is no feature in IdentifyLayerResult when web response is clearly ok?
2. Why there is only one feature? I would expect to see every feature that has start date < time extent and end date > time extent. Is this correct expectation, or am I missing something?

 

If anyone could shed some light on this I would be very grateful, I am struggling with that time extent for eons and I am either missing something or there is something wrong with runtime api.

Attachments

Outcomes