Specifies how a FeatureLayer should retrieve data from its FeatureModel. This is an abstract type and should not be instantiated directly. Instead, use one of its children:

A loading strategy instance cannot be shared by many FeatureLayers.

Since

2015.0

Hierarchy

Constructors

Accessors

Methods

Constructors

Accessors

  • get refresh(): null | number | Date
  • Controls the refresh settings for the Loading Strategy.

    • If the refresh property is set to null, the loading strategy never refreshes.
    • If the refresh property is set to a some number n, the loading strategy refreshes every n milliseconds.
    • If the refresh property is set to a Date object, the loading strategy will refresh at that time.

    Returns null | number | Date

    Since

    2020.1

  • set refresh(value): void
  • Parameters

    • value: null | number | Date

    Returns void

Methods

  • 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:

    You can set a custom implementation of shouldUpdate function to verify if the update operation should be performed on existing features.

    Parameters

    Returns boolean

    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;
    };

    Since

    2020.1