Module: ol/source/Source

ol/source/Source


Classes

Source

Type Definitions

Attribution()

A function that takes a ViewStateAndExtent and returns a string or an array of strings representing source attributions.

AttributionLike{string} {Array.<string>} {Attribution}

A type that can be used to provide attribution information for data sources.

It represents either

  • a simple string (e.g. '© Acme Inc.')
  • an array of simple strings (e.g. ['© Acme Inc.', '© Bacme Inc.'])
  • a function that returns a string or array of strings (Attribution)

Options{Object}

Properties:
Name Type Argument Default Description
attributions AttributionLike <optional>

Attributions.

attributionsCollapsible boolean <optional>
true

Attributions are collapsible.

projection ProjectionLike <optional>

Projection. Default is the view projection.

state State <optional>
'ready'

State.

wrapX boolean <optional>
false

WrapX.

interpolate boolean <optional>
false

Use interpolated values when resampling. By default, the nearest neighbor is used when resampling.

State{'undefined'} {'loading'} {'ready'} {'error'}

State of the source, one of 'undefined', 'loading', 'ready' or 'error'.