M/impl/layer/Vector~Vector


import Vector from 'M/impl/layer/Vector';

Main constructor of the class. Creates a Vector layer with parameters specified by the user

new Vector(options, vendorOptions)

impl/ol/layer/Vector.js, line 38
Name Type Description
options Mx.parameters.LayerOptions

custom options for this layer

vendorOptions Object

vendor options for the base library

Methods

addFeatures(features)

impl/ol/layer/Vector.js, line 144

This function add features to layer

Name Type Description
features Array.<M.feature>

Features to add

addTo(map)

impl/ol/layer/Vector.js, line 90

This function sets the map object of the layer

Name Type Description
map M.impl.Map

destroy()

impl/ol/layer/Vector.js, line 470

This function destroys this layer, cleaning the HTML and unregistering all events

equals(obj)

impl/ol/layer/Vector.js, line 436

This function checks if an object is equals to this layer

Name Type Description
obj object

Object to compare

getFeatureById(id){null|M.feature}

impl/ol/layer/Vector.js, line 216

This function returns the feature with this id

Name Type Description
id string | number

Id feature

Returns:
feature - Returns the feature with that id if it is found, in case it is not found or does not indicate the id returns null

getFeatures(skipFilter, filter){Array.<M.Feature>}

impl/ol/layer/Vector.js, line 200

This function returns all features or discriminating by the filter

Name Type Description
skipFilter boolean

Indicates whether skyp filter

filter M.Filter

Filter to execute

Returns:
returns all features or discriminating by the filter

getFeaturesExtent(skipFilter, filter){Array.<number>}

impl/ol/layer/Vector.js, line 281

This function return extent of all features or discriminating by the filter

Name Type Description
skipFilter boolean

Indicates whether skip filter

filter M.Filter

Filter to execute

Returns:
Extent of features

getFeaturesExtentPromise(skipFilter, filter){Array.<number>}

impl/ol/layer/Vector.js, line 488

This function return extent of all features or discriminating by the filter

Name Type Description
skipFilter boolean

Indicates whether skip filter

filter M.Filter

Filter to execute

Returns:
Extent of features

inRange()

impl/ol/layer/Vector.js, line 131

This function indicates if the layer is in range

isLoaded()

impl/ol/layer/Vector.js, line 458

TODO

redraw()

impl/ol/layer/Vector.js, line 246

This function redraw layer

refresh()

impl/ol/layer/Vector.js, line 449

This function refresh layer

removeFeatures(features)

impl/ol/layer/Vector.js, line 228

This function remove the features indicated

Name Type Description
features Array.<M.feature>

Features to remove

selectFeatures(feature)

impl/ol/layer/Vector.js, line 298

This function checks if an object is equals to this layer

Name Type Description
feature ol.Feature

setFacadeObj(obj)

impl/ol/layer/Vector.js, line 356

This function set facade class vector

Name Type Description
obj object

Facade vector

unselectFeatures()

impl/ol/layer/Vector.js, line 345

TODO