ol.source. ol.source.Vector

new Vector

Stability: experimental
Parameters:
Name Type Argument Description
options olx.source.VectorOptions <optional>

Vector source options.

Properties
Name Type Description
attributions Array.<ol.Attribution> | undefined

Attributions.

extent ol.Extent | undefined

Extent.

features Array.<ol.Feature> | undefined

Features.

logo string | undefined

Logo.

projection ol.proj.ProjectionLike

Projection.

state ol.source.State | string | undefined

State.

Source:
  • vectorsource.js, line 48
Fires:

Extends

Methods

addFeature

Stability: experimental
Parameters:
Name Type Description
feature ol.Feature

Feature.

Source:
  • vectorsource.js, line 90

addFeatures

Stability: experimental
Parameters:
Name Type Description
features Array.<ol.Feature>

Features.

Source:
  • vectorsource.js, line 128

dispatchChangeEvent

Stability: experimental

Dispatches a change event. Register a listener for this event to get notified of changes.

Inherited From:
Source:
  • observable.js, line 39
Fires:
  • event:change

forEachFeature

Stability: experimental
Parameters:
Name Type Argument Description
f function

Callback.

this T <optional>

The object to use as this in f.

Source:
  • vectorsource.js, line 169
Returns:
Type
S | undefined

forEachFeatureInExtent

Stability: experimental
Parameters:
Name Type Argument Description
extent ol.Extent

Extent.

f function

Callback.

this T <optional>

The object to use as this in f.

Source:
  • vectorsource.js, line 204
Returns:
Type
S | undefined

getClosestFeatureToCoordinate

Stability: experimental
Parameters:
Name Type Description
coordinate ol.Coordinate

Coordinate.

Source:
  • vectorsource.js, line 266
Returns:

Closest feature.

Type
ol.Feature

getExtent

Stability: experimental
Source:
  • vectorsource.js, line 312
Returns:

Extent.

Type
ol.Extent

getFeatures

Stability: experimental
Source:
  • vectorsource.js, line 228
Returns:

Features.

Type
Array.<ol.Feature>

getFeaturesAtCoordinate

Stability: experimental
Parameters:
Name Type Description
coordinate ol.Coordinate

Coordinate.

Source:
  • vectorsource.js, line 243
Returns:

Features.

Type
Array.<ol.Feature>

getState

Stability: experimental
Inherited From:
Source:
  • source.js, line 134
Returns:

State.

Type
ol.source.State

on

Stability: experimental

Listen for a certain type of event.

Parameters:
Name Type Argument Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

this Object <optional>

The object to use as this in listener.

Inherited From:
Source:
  • observable.js, line 61
Returns:

Unique key for the listener.

Type
goog.events.Key

once

Stability: experimental

Listen once for a certain type of event.

Parameters:
Name Type Argument Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

this Object <optional>

The object to use as this in listener.

Inherited From:
Source:
  • observable.js, line 74
Returns:

Unique key for the listener.

Type
goog.events.Key

removeFeature

Stability: experimental
Parameters:
Name Type Description
feature ol.Feature

Feature.

Source:
  • vectorsource.js, line 364

un

Stability: experimental

Unlisten for a certain type of event.

Parameters:
Name Type Argument Description
type string | Array.<string>

The event type or array of event types.

listener function

The listener function.

this Object <optional>

The object to use as this in listener.

Inherited From:
Source:
  • observable.js, line 86

unByKey

Stability: experimental

Removes an event listener using the key returned by on() or once().

Parameters:
Name Type Description
key goog.events.Key

Key.

Inherited From:
Source:
  • observable.js, line 96