Function of timeFilterMode in FeatureLayer?

3240
1
02-17-2016 06:07 PM
Labels (1)
BryanBaker
Occasional Contributor

I'm using a layer with both from- and to-time fields. The timeFilterMode option for FeatureLayer seems to imply that there's an option with time-based layers to fetch all features up front, rather than by the incremental server-based approach:

 

Determines where features are filtered by time. By default features will be filtered by the server. If set to 'client' all features are loaded and filtered on the client before display.

 

However, the 'client' setting seems to have no effect; in a debugger I can see that features are requested with each pan and zoom. I see there's no option generally for FeatureLayer to use the "snapshot" approach as with the JavaScript API. So what difference does using timeFilterMode='client' really make?

0 Kudos
1 Reply
JohnGravois
Frequent Contributor

if you snoop the web traffic when running our sample​ you can see several gridded queries to the feature service which retrieve features in the current map extent and ask for filtered results via the parameter below

Screenshot 2016-02-18 09.09.43.png

when we alter the sample to set timeFilterMode to client, the 'time' parameter is no longer included in requests.  in this situation, all features (in the current map extent) are retrieved from the service.  this means that users are able to manipulate the time extent in the application UI without forcing additional requests to be executed.

in either case, panning and zooming will cause the application to fire off additional requests to the server.  if you'd like to achieve something resembling the jsapi's snapshot mode, check out this sample.

0 Kudos