Class: tiledVectorLayer

L.supermap.tiledVectorLayer

The TiledVectorLayer class.

L.supermap.tiledVectorLayer(url, options)

TileVectorLayer.js, line 22
Name Type Description
url string

The url of service.

options Object

The optional parameters.

Name Type Default Description
layerNames string

Array of designed layer names, supporting the vector layer type.

layersID string

map layer ID to get tiles.

serverType SuperMap.ServerType SuperMap.ServerType.ISERVER optional

Server Type.

cartoCSS string optional

The client's CartoCSS style string.

serverCartoCSSStyle boolean true optional

Weather to use CartoCSS style of the server.

processCharacters boolean false optional

Whether to perform a specific character conversion when setting the client's CartoCSS style.

crs L.Proj.CRS optional

Coordinate system class.

returnAttributes boolean false optional

Whether to return attributes.

expands string optional

expands。

cacheEnabled boolean true optional

Whether to use the server cache to plot.

tileTemplate Object optional

Tile template. If this parameter is set, map out according to this template and the url is invalid(when docking tiles of the third party).

subdomains string optional

Subdomain.

timeout num 10000 optional

timeout。

attribution string 'Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' title='SuperMap iServer' target='_blank'>SuperMap iServer</a></span>` optional

Copyright information.

Example
L.supermap.tiledVectorLayer(url).addTo(map);

Extends

Methods

inherited 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.

getLayerStyleInfo(layerName)

TileVectorLayer.js, line 154

Get style information of the layer.

Name Type Description
layerName string

The layer name.

getScale(zoom){number}

TileVectorLayer.js, line 311

Get scale from zoom level.

Name Type Description
zoom number

The zoom level.

Returns:
Type Description
number The sacle.

getScaleFromCoords(coords){number}

TileVectorLayer.js, line 324

Get scale from coordinates.

Name Type Description
coords Object

Ranks symbol.

Returns:
Type Description
number The scale.

inherited 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.

inherited getStyles(){Object}

VectorGrid.js, line 89

Get styles of layers.

Returns:
Type Description
Object The styles of all layers.

getVectorStylesFromServer()

TileVectorLayer.js, line 204

Splice the locally configured cartoCSS and call the onAdd after the carto returned by the server.

inherited 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

setClientCartoCSS()

TileVectorLayer.js, line 239

Client set the style of cartoCSS.

inherited 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