I want to add layers to a map, with some criteria. Before the layer is drawn, I want to a set a time definition on the client-side to limit the data being rendered.
I've tried setting the time definition prior to calling map.addLayer, but the API seems to ignore the time definition when the layer is added to the map.
So briefly:
- FeatureLayer object created (in SNAPSHOT mode)
- setTimeDefinition called for FeatureLayer
- FeatureLayer object added to map via addLayer.
When 3 happens, a request is sent to the service but the time definition is not sent in the request.
${service url}/query?f=json&where=1%3D1&returnGeometry=true&spatialRel=esriSpatialRelIntersects&outFields=*&outSR=102100
as opposed to
${service url}/query?f=json&where=1%3D1&returnGeometry=true&spatialRel=esriSpatialRelIntersects&outFields=*&outSR=102100&time=1422030483999%2C1422030484000
Thoughts on what is happening? Is there another ordering I should try?