Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Overview

Constructors

Accessors

Methods

Constructors

constructor

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

    Parameters

    Returns LoadEverything

Accessors

queryProvider

refresh

  • get refresh(): Date | number | null
  • set refresh(value: Date | number | null): void
  • 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.
    since

    2020.1

    Returns Date | number | null

  • 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.
    since

    2020.1

    Parameters

    • value: Date | number | null

    Returns any

Methods

shouldUpdate

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

    since

    2020.1

    Parameters

    • existingFeature: Feature

      the feature that exists in the layer

    • feature: Feature

      of the feature with same id that comes from the query cursor

    Returns boolean

    true, if the update operation should be performed, false to keep the existing feature unchanged.

    // The strategy updates features by comparing the 'size' property.
    
    const loadingStrategy = new LoadSpatially({ queryProvider });
    loadingStrategy.shouldUpdate = function(existingFeature, feature) {
      return feature.properties.size !== existingFeature.properties.size;
    }

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method