How do you make features time-aware

957
5
01-11-2018 12:40 PM
ThomasAriston
New Contributor II

The new 100.2.0 release has Time Aware layers, however, the examples point to an Esri endpoint Layer: Atlantic Hurricanes 2000 (ID: 0).

Is the new Time Aware functionality coupled to official Esri endpoints? Or can other services return data that be made time aware?

Our application has a use case for looking at the state of the map given a time period, however, we have implemented some logic on our end to filter the data (which does not come from an esri service) based on that time. It would be great to leverage this new functionality if possible.

Thank you

0 Kudos
5 Replies
dotMorten_esri
Esri Notable Contributor

The time component of the feature layer is done as part of authoring and publishing the data to the server. The runtime then reads it and consumes it wrt how it was authored.

0 Kudos
ThomasAriston
New Contributor II

Thank you for your response. I figured that the time component needed to be provided by the service endpoint, however, my question is does that endpoint have to come from an Esri server?

To be more specific, my use case is that I have client data which has time information about assets that also have geolocation. I was wondering if I could hook into the new runtime time-aware logic. Does this make sense?

0 Kudos
dotMorten_esri
Esri Notable Contributor

We read the time info from the services where we support time. What sort layer / data are you using to render it in runtime, if that's not what you're using?

0 Kudos
ThomasAriston
New Contributor II

Maybe I've gotten a little ahead of myself. I just beginning to migrate a Leaflet app to the Esri Runtime. I have a service endpoint that returned geojson and I use that to create my layers. We have to filter data by time with our own custom filters. I was hoping to be able to modify the geojson to include time data and pass that to a FeatureCollectionLayer (which is made of FeatureLayers and I was hoping could be made time-aware), but it appears that perhaps the Esri layers do not consume geojson. Is there an open specification for the Json that needs to be provided to FeatureCollection.FromJson(json)? If not, my plan was to consume the geojson, convert it to c# objects that can be used to construct a FeatureCollectionTable.

To reiterate, some of the data will NOT come from an Esri portal/service. It's simply customer data with lat/lon/time and a few other properties.

0 Kudos
dotMorten_esri
Esri Notable Contributor

You can see the format described here:

 http://sampleserver6.arcgisonline.com/arcgis/sdk/rest/index.html#/FeatureSet_object/02ss000000q60000...

It's probably easier to just create your own geojson parser, and create the features programmatically as you go.

Wrt to filtering by time, the easiest way is to just use the Definition Expression on the feature layer to filter by an attribute. Ie where "MinDate>1000000 and MaxDate<2000000".

0 Kudos