Class: Graphic

ol.Graphic

The high efficiency layer point feature class.

new ol.Graphic(geometry, attributes)

Graphic.js, line 3
Name Type Description
geometry ol.geom.Point

Geometry object.

attributes Object optional

Featuers attributes.

Extends

  • ol.Object

Methods

ol.Graphic.createStyleFunction(obj)

Graphic.js, line 126

Create function of the style.

Name Type Description
obj Object

The object parameters.

clone(){ol.Graphic}

Graphic.js, line 22

Copy the current information.

Returns:
Type Description
ol.Graphic Cloned element.

destroy()

Graphic.js, line 155

Destroy parameter values.

getAttributes(){Object}

Graphic.js, line 82

Get the feature attributes.

Returns:
Type Description
Object Attribute object.

getGeometry(){ol.geom.Point}

Graphic.js, line 55

Get information of the current geometry.

Returns:
Type Description
ol.geom.Point Geometric information of features.

getId(){string}

Graphic.js, line 36

Get the current id.

Returns:
Type Description
string id

getStyle(){ol.style.Image}

Graphic.js, line 91

Get style

Returns:
Type Description
ol.style.Image Style object for ol.style.Image subclass.

getStyleFunction(){function}

Graphic.js, line 117

Get function of the style.

Returns:
Type Description
function Style Function.

setAttributes(attributes)

Graphic.js, line 73

Set the feature properties.

Name Type Description
attributes Object

Attribute object.

setGeometry(geometry)

Graphic.js, line 64

Set information of the current geometry.

Name Type Description
geometry ol.geom.Point

Geometry parameters.

setId(id)

Graphic.js, line 45

Set the current id.

Name Type Description
id string

Featuers ID.

setStyle(style)

Graphic.js, line 100

Set style.

Name Type Description
style ol.style.Image

Style object for ol.style.Image subclass.