Class: graphic

L.supermap.graphic

The Graphic class

L.supermap.graphic(options)

D:/iClient9_English0919/src/leaflet/overlay/graphic/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}

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 97

Get the feature attributes.

Returns:
Type Description
Object Feature attribute.

getCanvas(){HTMLCanvasElement}

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 87

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

Deprecated
  • Yes
Returns:
Type Description
HTMLCanvasElement Canvas

getId(){string}

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 29

Get the current ID.

Returns:
Type Description
string id

getLatLng(){L.LatLng}

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 77

Get the latitude and longitude.

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

getStyle(){L.supermap.circleStyle|L.supermap.imageStyle|L.supermap.cloverStyle}

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 115

Get the style.

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

setAttributes(attributes)

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 67

Set the feature attributes.

Name Type Description
attributes Object

attributes object.

setCanvas(canvas)

D:/iClient9_English0919/src/leaflet/overlay/graphic/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.

Deprecated
  • Yes

setId(id)

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 38

Set the current feature ID.

Name Type Description
id string

Feature ID.

setLatLng(latLng)

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 48

Set the latitude and longitude.

Name Type Description
latLng L.LatLng

The latitude and longitude parameters of Leaflet.

setStyle(style)

D:/iClient9_English0919/src/leaflet/overlay/graphic/Graphic.js, line 106

Set the style.

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

style.