Class: TileVector

ol.source. TileVector

experimental new ol.source.TileVector(options)

Name Type Description
options

Options.

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

Attributions.

defaultProjection ol.proj.ProjectionLike

Default projection.

extent ol.Extent | undefined

Extent.

logo string | undefined

Logo.

object GeoJSONObject | undefined

Object.

projection ol.proj.ProjectionLike

Destination projection. If provided, features will be transformed to this projection. If not provided, features will not be transformed.

tileGrid ol.tilegrid.TileGrid

Tile grid.

tileUrlFunction ol.TileUrlFunctionType | undefined

Optional function to get tile URL given a tile coordinate and the projection. Required if url or urls are not provided.

url string | undefined

URL template. Must include {x}, {y} or {-y}, and {z} placeholders.

urls Array.<string> | undefined

An array of URL templates.

Fires:

Extends

Methods

experimental addFeature(feature)

Name Type Description
feature ol.Feature

Feature.

experimental addFeatures(features)

Name Type Description
features Array.<ol.Feature>

Features.

experimental inherited dispatchChangeEvent()

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

Fires:
  • change

experimental forEachFeature(f, opt_this){S|undefined}

Name Type Argument Description
f function

Callback.

this T <optional>
optional

The object to use as this in f.

experimental forEachFeatureInExtent(extent, f, opt_this){S|undefined}

Name Type Argument Description
extent ol.Extent

Extent.

f function

Callback.

this T <optional>
optional

The object to use as this in f.

experimental getClosestFeatureToCoordinate(coordinate){ol.Feature}

Name Type Description
coordinate ol.Coordinate

Coordinate.

Returns:
feature.

experimental getFeatures(){Array.<ol.Feature>}

experimental inherited getFeaturesAtCoordinate(coordinate){Array.<ol.Feature>}

Name Type Description
coordinate ol.Coordinate

Coordinate.

experimental inherited on(type, listener, opt_this){goog.events.Key}

Listen for a certain type of event.

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

The event type or array of event types.

listener function

The listener function.

this Object <optional>
optional

The object to use as this in listener.

Returns:
key for the listener.

experimental inherited once(type, listener, opt_this){goog.events.Key}

Listen once for a certain type of event.

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

The event type or array of event types.

listener function

The listener function.

this Object <optional>
optional

The object to use as this in listener.

Returns:
key for the listener.

experimental removeFeature(feature)

Name Type Description
feature ol.Feature

Feature.

experimental inherited un(type, listener, opt_this)

Unlisten for a certain type of event.

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

The event type or array of event types.

listener function

The listener function.

this Object <optional>
optional

The object to use as this in listener.

experimental inherited unByKey(key)

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

Name Type Description
key goog.events.Key

Key.