Class: graphic

L.supermap.graphic

The Graphic class

L.supermap.graphic(options)

Graphic.js, line 8
Name Type Description
options Object

The optional graphic parameters.

Name Type Description
latLng L.LatLng

Latitude and longitude.

style L.supermap.circleStyle | L.supermap.cloverStyle | L.supermap.imageStyle optional

Point style.

attributes Object optional

Feature attribute.

Extends

Methods

getAttributes(){Object}

Graphic.js, line 97

Get the feature attributes.

Returns:
Type Description
Object Feature attribute.

deprecated getCanvas(){HTMLCanvasElement}

Graphic.js, line 87

Get the canvas, the setting has been deprecated, please use the getStyle interface.

Returns:
Type Description
HTMLCanvasElement Canvas

getId(){string}

Graphic.js, line 29

Get the current ID.

Returns:
Type Description
string id

getLatLng(){L.LatLng}

Graphic.js, line 77

Get the latitude and longitude.

Returns:
Type Description
L.LatLng the latitude and longitude.

Get the style.

Returns:
Type Description
L.supermap.circleStyle | L.supermap.imageStyle | L.supermap.cloverStyle style.

setAttributes(attributes)

Graphic.js, line 67

Set the feature attributes.

Name Type Description
attributes Object

attributes object.

deprecated setCanvas(canvas)

Graphic.js, line 57

Set the canvas, the setting has been deprecated, use the setStyle interface.

Name Type Description
canvas HTMLCanvasElement

The canvas that needs to be set.

setId(id)

Graphic.js, line 38

Set the current feature ID.

Name Type Description
id string

Feature ID.

setLatLng(latLng)

Graphic.js, line 48

Set the latitude and longitude.

Name Type Description
latLng L.LatLng

The latitude and longitude parameters of Leaflet.

setStyle(style)

Graphic.js, line 106

Set the style.

Name Type Description
style L.supermap.circleStyle | L.supermap.imageStyle | L.supermap.cloverStyle

style.