Class: VectorGrid

L.supermap.VectorGrid

The VectorGrid base class.

L.supermap.VectorGrid(options)

VectorGrid.js, line 12
Name Type Description
options Object

The options parameters of the VectorGrid.

Name Type Default Description
vectorTileLayerStyles Object optional

The style of vector tile layer.

renderer string 'SVG' optional

The renderer type.

format L.supermap.VectorTileFormat VectorTileFormat.JSON optional

The format of the vector tile.

interactive boolean true optional

Whether interactive or not.

maxZoom number 23 optional

The maximum zoom level.

Extends

Methods

getDataLayerNames(){Array}

VectorGrid.js, line 155

Get name of the data layer.

Returns:
Type Description
Array Return an array of name of the data layer.

getStyle(layerName){Object}

VectorGrid.js, line 98

Get style of the specified layer.

Name Type Description
layerName string

Name of the layer.

Returns:
Type Description
Object The style of the specified layer.

getStyles(){Object}

VectorGrid.js, line 89

Get styles of layers.

Returns:
Type Description
Object The styles of all layers.

resetFeatureStyle(id, layerName){this}

VectorGrid.js, line 132

Reset style of the feature. Determine an element that requires ID and layerName

Name Type Description
id number

ID of the feature.

layerName string

Name of the layer.

Returns:
Type Description
this this

setFeatureStyle(id, layerName, layerStyle){this}

VectorGrid.js, line 108

Set Style of the feature. Determine an element that requires ID and layerName.

Name Type Description
id number

ID of the feature.

layerName string

Name of the layer.

layerStyle Array | function

Style of the layer.

Returns:
Type Description
this this