Class: VectorTile

ol/VectorTile~VectorTile


Methods

getExtent(){module:ol/extent~Extent}

VectorTile.js, line 107

Gets the extent of the vector tile.

Returns:
The extent.

getFeatures(){Array.<(module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)>}

VectorTile.js, line 126

Get the features for this tile. Geometries will be in the projection returned by module:ol/VectorTile~VectorTile#getProjection.

Returns:
Features.

getFormat(){module:ol/format/Feature~FeatureFormat}

VectorTile.js, line 116

Get the feature format assigned for reading this tile's features.

Returns:
Feature format.

getProjection(){module:ol/proj/Projection~Projection}

VectorTile.js, line 143

Get the feature projection of features returned by module:ol/VectorTile~VectorTile#getFeatures.

Returns:
Feature projection.

setExtent(extent)

VectorTile.js, line 198

Function for use in an module:ol/source/VectorTile~VectorTile's tileLoadFunction. Sets the extent of the vector tile. This is only required for tiles in projections with tile-pixels as units. The extent should be set to [0, 0, tilePixelSize, tilePixelSize], where tilePixelSize is calculated by multiplying the tile size with the tile pixel ratio. For sources using module:ol/format/MVT~MVT as feature format, the module:ol/format/MVT~MVT#getLastExtent method will return the correct extent. The default is [0, 0, 4096, 4096].

Name Type Description
extent module:ol/extent~Extent

The extent.

setFeatures(features)

VectorTile.js, line 208

Function for use in an module:ol/source/VectorTile~VectorTile's tileLoadFunction. Sets the features for the tile.

Name Type Description
features Array.<module:ol/Feature~Feature>

Features.

setLoader(loader)

VectorTile.js, line 238

Set the feature loader for reading this tile's features.

Name Type Description
loader module:ol/featureloader~FeatureLoader

Feature loader.

setProjection(projection)

VectorTile.js, line 220

Function for use in an module:ol/source/VectorTile~VectorTile's tileLoadFunction. Sets the projection of the features that were added with module:ol/VectorTile~VectorTile#setFeatures.

Name Type Description
projection module:ol/proj/Projection~Projection

Feature projection.