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:
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?
I ran a quick test using some sample data and in my testing the time extent was applied to the layer query. Here's my test app.
Maybe try this test app with your data and see if it works?