logo
Documentation
Tutorials
Getting Started Initialization Layers Third party Controls Geometries Vector styles Measures InfoBox
Releases

Documentation

Modules

  • Constants

Events

  • FEATURE_CLICK
  • FEATURE_HOVER
  • CHANGE_MEASURE
  • CLICK
  • FEATURES_CLICK
  • FIND_IMAGES_LOADED
  • LAYER_AOIS
  • MAP_INITIALIZE
  • MOVE_END
  • POINTER_MOVE
  • TILES_END_LOAD
  • TILES_START_LOAD
  • FEATURE_CLICK
  • FEATURE_HOVER

General

Classes / Controls

  • Bar
  • Button
  • Swipe
  • Toggle

Classes / Managers

  • LayerManager
  • MeasurementManager

Classes

  • Map

Geometry

Classes

  • Extent
  • Feature
  • Line
  • Location
  • MultiPolygon
  • Point
  • Polygon

Classes / Readers

  • GeoJSON
  • WKT

InfoBox

Classes

  • InfoBox

Layers

Classes / Internal

  • AOILayer
  • VexcelLayer

Classes

  • ArcGISLayer
  • BingLayer
  • GroupLayer
  • OSMLayer
  • VectorLayer
  • VectorTileLayer
  • WFSLayer
  • WMSLayer
  • WMTSLayer
  • XYZLayer

Measurements

Classes / Tools

  • LineTool
  • PointTool
  • PolygonTool

Classes

  • Measure

Services

Classes

  • UserService

Styles

Classes

  • Circle
  • Fill
  • Icon
  • RegularShape
  • Stroke
  • Style
  • Text

Class

VectorTileLayer

VectorTileLayer(opts)

Layer for Vector tile data that is rendered client-side.

Learn more about Vector Tile Layers in our Vector Tiles tutorial.

Constructor

# new VectorTileLayer(opts)

Initialization object

Parameters:
Name Type Attributes Default Description
opts object

Vector tile layer options

name string <optional>

Layer name

order number <optional>

The order for layer rendering. At rendering time, the layers will be ordered, first by order and then by position. When undefined, a order of 0 is assumed for layers that are added to the map's layers collection.

visible boolean <optional>
true

Visibility

opacity number <optional>
1

Opacity (0, 1).

features Array.<Feature> <optional>

Feature list, the geometry of the features must be on geographic coordinates

style Array.<Style> <optional>

Array of custom styles, to modify how to render the vector data. Also you can pass a function that return a style, this function it's called for each feature and receive feature an resolution in the parameters

url string <optional>

Setting this option instructs the source to load features using an XHR loader. Use a string a one-off download of all features from the given URL. Default format is GeoJSON. When default XHR feature loader is provided, the features will be transformed from the data projection to the view projection during parsing. The default projection is EPSG:4326. Note that if a source contains non-feature data, such as a GeoJSON geometry

token string <optional>

autenthication token to add to the url like token parameter token=${token}

styleUrl string <optional>

url with vector styles

Tutorials:
  • Vector Tiles
Example

Create empty layer

const layer = new Vexcel.Layers.VectorTileLayer();

Extends

  • InternalVectorLayer

Classes

VectorTileLayer

Methods

# getMaxZoom() → {number}

Gets the maximum zoom level of the layer.

Overrides:
  • InternalVectorLayer#getMaxZoom

The maximum zoom level of the layer.

number

# getMinZoom() → {number}

Gets the minimum zoom level of the layer.

Overrides:
  • InternalVectorLayer#getMinZoom

The minimum zoom level of the layer.

number

# getOpacity() → {number}

Gets the opacity of the layer (between 0 and 1).

Overrides:
  • InternalVectorLayer#getOpacity

The opacity of the layer.

number

# getVisible() → {boolean}

Gets the visibility of the layer (true or false).

Overrides:
  • InternalVectorLayer#getVisible

The visibility of the layer.

boolean

# setMaxZoom(maxZoom)

Sets the maximum zoom (exclusive) at which the layer is visible. Note that the zoom levels for layer visibility are based on the view zoom level, which may be different from a tile source zoom level.

Parameters:
Name Type Description
maxZoom number

The maximum zoom of the layer.

Overrides:
  • InternalVectorLayer#setMaxZoom

# setMinZoom(minZoom)

Sets the minimum zoom (inclusive) at which the layer is visible. Note that the zoom levels for layer visibility are based on the view zoom level, which may be different from a tile source zoom level.

Parameters:
Name Type Description
minZoom number

The minimum zoom of the layer.

Overrides:
  • InternalVectorLayer#setMinZoom

# setOpacity(opacity)

Sets the opacity of the layer, allowed values range from 0 to 1.

Parameters:
Name Type Description
opacity number

The opacity of the layer.

Overrides:
  • InternalVectorLayer#setOpacity

# setVisible(visible)

Sets the visibility of the layer (true or false).

Parameters:
Name Type Description
visible boolean

The visibility of the layer.

Overrides:
  • InternalVectorLayer#setVisible

Documentation generated by Vexcel Imaging