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

Documentation

Modules

  • Constants

Events

  • FEATURE_CLICK
  • FEATURE_HOVER
  • CENTER_DATE_IMAGE
  • CHANGE_MEASURE
  • CLICK
  • COMPLETE_COLLECTIONS
  • FEATURES_CLICK
  • FIND_IMAGES_LOADED
  • FINISH_MEASURE
  • MAP_INITIALIZE
  • MAP_STATUS_EVENT
  • MOVE_END
  • NO_3D_IMAGES
  • POINTER_MOVE
  • START_MEASURE
  • TILES_END_LOAD
  • TILES_START_LOAD
  • FEATURE_CLICK
  • FEATURE_HOVER

General

Classes / Controls

  • Bar
  • Button
  • Swipe
  • Toggle

Classes / Managers

  • CollectionManager
  • OverlayManager

Classes

  • Map

Classes / View

  • MapStatusView

Geometry

Classes

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

Classes / Readers

  • GeoJSON
  • WKT

InfoBox

Classes

  • InfoBox

Layers

Classes

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

Classes / Base Layers

  • BaseLayer
  • BaseVectorLayer

Measurements

Classes / Tools

  • CircleTool
  • HeightTool
  • LineTool
  • PointTool
  • PolygonTool
  • RectangleTool
  • RelativeHeightTool

Classes

  • Measure

Objects

Classes

  • Collection
  • CollectionStatus
  • Image
  • LayerCollections
  • LayerCollectionsStatus
  • MapStatus

Services

Classes

  • UserService

Styles

Classes

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

Utils

Classes

  • Transform

Class

VectorLayer

VectorLayer(opts)

Layer for Vector data that is rendered client-side.

Learn more about Vector Layers in our Vector Layer tutorial.

Constructor

# new VectorLayer(opts)

Initialization object

Parameters:
Name Type Attributes Default Description
opts object

WFS 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

attributions string <optional>

Attributions.

obliqueProjection ObliqueProjections <optional>
dtm

Set how the vector layer will reproject in oblique mode.
If none it´s set, the vector layer will not reproject in oblique mode.
'dtm' the layer will reproject the points on the dtm surface.
'dsm' the layer will reprojects the points on the dsm surface, if there´s no DSM available DTM will be used instead.

Tutorials:
  • Vector Layer
Example

Create empty layer

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

Extends

  • BaseVectorLayer

Classes

VectorLayer

Methods

# addFeatures(features)

Add new features to the vector layer, the geometry of the features must be on geographic coordinates

Parameters:
Name Type Description
features array.<Feature>

# clear()

Remove all features

# getAttributions() → {string}

Gets the attributions of the layer.

Attributions of the layer.

string

# getBoundingBox() → {Extent}

Gets the bounding box of features in the layer

Overrides:
  • BaseVectorLayer#getBoundingBox

bounding box

Extent

# getFeatures() → {array.<Feature>}

Return the current feature list of the layer

array.<Feature>

# getMaxZoom() → {number}

Gets the maximum zoom level of the layer.

Overrides:
  • BaseVectorLayer#getMaxZoom

The maximum zoom level of the layer.

number

# getMinZoom() → {number}

Gets the minimum zoom level of the layer.

Overrides:
  • BaseVectorLayer#getMinZoom

The minimum zoom level of the layer.

number

# getObliqueProjection() → {string}

Gets the oblique projection of the layer.

Overrides:
  • BaseVectorLayer#getObliqueProjection

The oblique projection of the layer.

string

# getOpacity() → {number}

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

Overrides:
  • BaseVectorLayer#getOpacity

The opacity of the layer.

number

# getVisible() → {boolean}

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

Overrides:
  • BaseVectorLayer#getVisible

The visibility of the layer.

boolean

# removeFeature(feature)

Remove a single feature from the source. If you want to remove all features at once, use the #clear() method instead.

Parameters:
Name Type Description
feature Feature

Feature to remove

# setAttributions(attributions)

Sets the attributions of the layer.

Parameters:
Name Type Description
attributions string

Attributions. Can be passed as string.

# 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:
  • BaseVectorLayer#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:
  • BaseVectorLayer#setMinZoom

# setObliqueProjection(obliqueProjection)

Sets the oblique projection of the layer. Note:

  • 'none' it´s set, the vector layer will not reprojects on oblique mode.
  • 'dtm' the layer will reprojects the points on the dtm surface
  • 'dsm' the layer will reprojects the points on the dsm surface, if there´s no DSM available DTM will be used instead.

Parameters:
Name Type Description
obliqueProjection ObliqueProjections

The oblique projection of the layer.

Overrides:
  • BaseVectorLayer#setObliqueProjection
See:
  • ObliqueProjections

# 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:
  • BaseVectorLayer#setOpacity

# setVisible(visible)

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

Parameters:
Name Type Description
visible boolean

The visibility of the layer.

Overrides:
  • BaseVectorLayer#setVisible

Documentation generated by Vexcel Imaging