Options
All
  • Public
  • Public/Protected
  • All
Menu

Converts mouse events (typically clicks) to Features by querying GetFeatureInfo for the given source.

Hierarchy

  • FeatureEvents

Index

Constructors

constructor

Properties

errors

errors: Observable<Error | TypeError | Response> = ...

We do not want (temporary network) errors to terminate the feature subscriptions, so we report errors on a separate stream.

features

features: Observable<Feature<Geometry>[]> = ...

An Observable of found Features. Each event on the stream corresponds to a mouse event. The data is an array of Features, as a click can hit several features at once. (Or an empty array if nothing was hit).

Methods

setMouseEvents

  • Sets the source of the mouse events which trigger fetching feature info.

    Parameters

    • mouseEvents: MouseEvents | Observable<MapBrowserEvent<MouseEvent>>

    Returns FeatureEvents

setSource

  • setSource(source: undefined | ImageWMS | TileWMS, queryLayers: undefined | string): FeatureEvents
  • Sets the source to fetch features from.

    Parameters

    • source: undefined | ImageWMS | TileWMS
    • queryLayers: undefined | string

    Returns FeatureEvents