Constructs a loading strategy that loads all data that satisfies a given condition. If no condition is configured, all data will be loaded from the model.
Optional
options: LoadEverythingConstructorOptionsconfiguration options
The query provider configured on this strategy.
Controls the refresh settings for the Loading Strategy.
null
, the loading strategy never refreshes.
n
, the loading strategy refreshes every n
milliseconds.
Date
object, the loading strategy will refresh at that time.
2020.1
This is a predicate function that is called by LuciadRIA when processing the query cursor in order to find out if an existing feature should be replaced by a new version from the cursor. If the result of this test is true then the feature will be replaced by the new version. By default LuciadRIA does not replace existing features, as the update operation incurs some performance impact.
Please note that the query process is launched when:
Map
You can set a custom implementation of shouldUpdate
function to verify if the update
operation should be performed on existing features.
the feature that exists in the layer
of the feature with same id that comes from the query cursor
true, if the update operation should be performed, false to keep the existing feature unchanged.
const loadingStrategy = new LoadSpatially({queryProvider: queryProvider});
//Replace the shouldUpdate function with a custom implementation which checks the revision
//number stored in the Feature to decide whether or not the Feature should be updated
loadingStrategy.shouldUpdate = function(existingFeature: Feature, feature: Feature): boolean {
const properties = feature.properties as any;
return properties.revision &&
properties.revision > (existingFeature.properties as any).revision;
};
2020.1
A FeatureLayer configured with this strategy will retrieve all data that satisfies a particular filter condition from its model. The condition can be configured by means of a QueryProvider.
Since 2020.1 a predicate function LoadingStrategy.shouldUpdate is exposed in order to control if an existing feature should be replaced by a new version from the cursor.
Please note that by default LuciadRIA does not replace existing features, as the update operation incurs some performance impact.
Since
2015.0