M/impl/Feature~Feature


import Feature from 'M/impl/Feature';

Main constructor of the class. Create a Feature

new Feature(id, geojson)

impl/ol/feature/Feature.js, line 31
Name Type Description
id string

id to feature

geojson Object

geojson to feature

Methods

module:M/impl/Feature~Feature.facade2OLFeature(facadeFeature){OLFeature}

impl/ol/feature/Feature.js, line 177

This funcion transform M.Feature to OLFeature

Name Type Description
facadeFeature M.Feature

M.Feature

Returns:
olFeature - OLFeature

module:M/impl/Feature~Feature.getGeometry(geojson){object}

impl/ol/feature/Feature.js, line 216

This function return geometry feature

Name Type Description
geojson object

GeoJSON Feature

Returns:
Geometry feature

module:M/impl/Feature~Feature.olFeature2Facade(olFeature, canBeModified){M.Feature}

impl/ol/feature/Feature.js, line 139

This funcion transform OLFeature to M.Feature

Name Type Description
olFeature OLFeature

OLFeature

canBeModified boolean
Returns:
facadeFeature - M.Feature

module:M/impl/Feature~Feature.olRenderFeature2Facade(olRenderFeature, tileProjection, mapProjection){M.Feature}

impl/ol/feature/Feature.js, line 159

This funcion transform OLRenderFeature to M.Feature

Name Type Description
olRenderFeature RenderFeature

OLFeature

tileProjection ol.Projection
mapProjection ol.Projection
Returns:
facadeFeature - M.Feature

clearStyle(){Array.<number>}

impl/ol/feature/Feature.js, line 311

This function clear the style of feature

getAttribute(attribute){string|number|object}

impl/ol/feature/Feature.js, line 190

This function returns the value of the indicated attribute

Name Type Description
attribute string

Name attribute

Returns:
returns the value of the indicated attribute

getAttributes(){Object}

impl/ol/feature/Feature.js, line 84

This function return attributes feature

Returns:
Attributes feature

getCentroid(){Array.<number>}

impl/ol/feature/Feature.js, line 287

This function returns de centroid of feature

getId(){string}

impl/ol/feature/Feature.js, line 101

This function return id feature

Returns:
ID to feature

getOLFeature(){OLFeature}

impl/ol/feature/Feature.js, line 57

This function returns the openlayers object of the features

Returns:
returns the openlayers object of the features

setAttribute(attribute){string|number|object}

impl/ol/feature/Feature.js, line 203

This function set value of the indicated attribute

Name Type Description
attribute string

Name attribute

Returns:
returns the value of the indicated attribute

setAttributes(attributes)

impl/ol/feature/Feature.js, line 125

This function set attributes feature

Name Type Description
attributes Object

attributes to feature

setFacadeObj(obj)

impl/ol/feature/Feature.js, line 275

This function set facade class vector

Name Type Description
obj object

Facade vector

setGeometry(Geometry)

impl/ol/feature/Feature.js, line 247

This function set geometry feature

Name Type Description
Geometry object

GeoJSON Feature

setId(id)

impl/ol/feature/Feature.js, line 113

This function set id

Name Type Description
id string

ID to feature

setOLFeature(olFeature)

impl/ol/feature/Feature.js, line 68

This function set the openlayers object of the features

Name Type Description
olFeature OLFeature

ol Feature to feature