Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides a featureOverlay used by the FeatureOverlayManager.

Example of initialization: const featureOverlay = new FeatureOverlay(manager, index);

param manager

The feature overlay manager.

param index

This feature overlay's index.

Hierarchy

  • FeatureOverlay

Index

Constructors

Properties

index_: number
listenerKeys_: EventsKey[]

Methods

  • addFeature(feature: Feature<Geometry>): void
  • Add a feature to the feature overlay.

    Parameters

    • feature: Feature<Geometry>

      The feature to add.

    Returns void

  • clear(): void
  • handleFeatureAdd_(evt: BaseEvent | Event): void
  • handleFeatureRemove_(evt: BaseEvent | Event): void
  • isEmpty(): boolean
  • Check if featureOverlay has no features.

    Returns boolean

    True if there is no features. False otherwise.

  • removeFeature(feature: Feature<Geometry>): void
  • Remove a feature from the feature overlay.

    Parameters

    • feature: Feature<Geometry>

      The feature to remove.

    Returns void

  • setFeatures(features: Collection<Feature<Geometry>>): void
  • Configure this feature overlay with a feature collection. Features added to the collection are also added to the overlay. Same for removal. If you configure the feature overlay with a feature collection you will use the collection to add and remove features instead of using the overlay's addFeature, removeFeature and clear functions.

    Parameters

    • features: Collection<Feature<Geometry>>

      Feature collection.

    Returns void

  • setStyle(style: Style | Style[] | StyleFunction): void
  • Set a style for the feature overlay.

    Parameters

    • style: Style | Style[] | StyleFunction

      Style.

    Returns void

Generated using TypeDoc