Module: ol/source/Source

ol/source/Source


Classes

Source

Type Definitions

Attribution()

A function that takes a ViewStateLayerStateExtent 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 Description
attributions AttributionLike | undefined

Attributions.

attributionsCollapsible boolean
(defaults to true)

Attributions are collapsible.

projection ProjectionLike | undefined

Projection. Default is the view projection.

state State
(defaults to 'ready')

State.

wrapX boolean
(defaults to false)

WrapX.

interpolate boolean
(defaults to 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'.