Class: Graphic

ol.Graphic

The high efficiency layer point feature class.

new ol.Graphic(geometry, attributes)

D:/iClient9_English0919/src/openlayers/overlay/graphic/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)

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 126

Create function of the style.

Name Type Description
obj Object

The object parameters.

clone(){ol.Graphic}

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 22

Copy the current information.

Returns:
Type Description
ol.Graphic Cloned element.

destroy()

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 155

Destroy parameter values.

getAttributes(){Object}

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 82

Get the feature attributes.

Returns:
Type Description
Object Attribute object.

getGeometry(){ol.geom.Point}

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 55

Get information of the current geometry.

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

getId(){string}

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 36

Get the current id.

Returns:
Type Description
string id

getStyle(){ol.style.Image}

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 91

Get style

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

getStyleFunction(){function}

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 117

Get function of the style.

Returns:
Type Description
function Style Function.

setAttributes(attributes)

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 73

Set the feature properties.

Name Type Description
attributes Object

Attribute object.

setGeometry(geometry)

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 64

Set information of the current geometry.

Name Type Description
geometry ol.geom.Point

Geometry parameters.

setId(id)

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 45

Set the current id.

Name Type Description
id string

Featuers ID.

setStyle(style)

D:/iClient9_English0919/src/openlayers/overlay/graphic/Graphic.js, line 100

Set style.

Name Type Description
style ol.style.Image

Style object for ol.style.Image subclass.