addFeatureOverrideProvider Method

Add a FeatureOverrideProvider to customize the appearance of Viewport.Features within the viewport. The provider will be invoked whenever the overrides are determined to need updating. The overrides can be explicitly marked as needing a refresh by calling Viewport.setFeatureOverrideProviderChanged. This is typically called when the internal state of the provider changes such that the computed overrides must also change.

addFeatureOverrideProvider(provider: FeatureOverrideProvider): boolean

note A Viewport can have any number of FeatureOverrideProviders. No attempt is made to resolve conflicts between two different providers overriding the same Feature.

see Viewport.dropFeatureOverrideProvider to remove the provider.

see Viewport.findFeatureOverrideProvider to find an existing provider.

see FeatureSymbology.Overrides.

Parameter Type Description
provider FeatureOverrideProvider The provider to register.

Returns - boolean

true if the provider was registered, or false if the provider was already registered.

Defined in

Last Updated: 20 June, 2023