Class: SignSymbolLayer

SignSymbolLayer

标牌图层。

new SignSymbolLayer(name, serverUrl, options)

Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new L.supermap.plotting.SignSymbolLayer(name, serverUrl, options);
  
  // 另一种写法
  L.supermap.plotting.signSymbolLayer(name, serverUrl, options);

  
</script>

// ES6 Import
import { SignSymbolLayer } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';

new SignSymbolLayer(name, serverUrl, options);

leaflet/mapping/SignSymbolLayer.js, line 8
Name Type Description
name string

标牌图层名称。

serverUrl string

标绘服务地址。

options Object

标牌图层参数。

Name Type Default Description
caption string "标牌图层" 可选

图层显示名称。

tolerancePixel number 5 可选

选择标号的容限,单位是像素。

isLocked boolean false 可选

图层锁定。

isEditable boolean true 可选

图层可编辑。

isSelected boolean true 可选

图层可选择。

visibility boolean true 可选

图层可见。

minVisibleScale number 0 可选

图层最小可见比例尺。

maxVisibleScale number 0 可选

图层最大可见比例尺。

Methods

addFeatures(signSymbols)

leaflet/mapping/SignSymbolLayer.js, line 207

添加标牌。

Name Type Description
signSymbols Array.<SignSymbol>

标牌。

createSignSymbol(latlng, symbolText, options, callback){SignSymbol}

leaflet/mapping/SignSymbolLayer.js, line 153

根据位置点创建标牌。

Name Type Description
latlng L.LatLng

标牌的创建点位

symbolText SymbolText

标牌数据。

options Object

标牌参数。

Name Type Default Description
uuid Object 可选

标牌名称。

isLocked Object false 可选

标牌的锁定。

enableEdit Object true 可选

标牌的可编辑。

enableSelected Object true 可选

标牌的可选择。

callback function 可选

回调函数。

Returns:
Type Description
SignSymbol 标牌对象。

destroy()

leaflet/mapping/SignSymbolLayer.js, line 279

销毁对象,释放资源。

findSignSymbolByUuid(uuid){SignSymbol}

leaflet/mapping/SignSymbolLayer.js, line 187

根据标牌id查找标牌。

Name Type Description
uuid string

标牌id。

Returns:
Type Description
SignSymbol 标牌对象。

fromJSONData()

leaflet/mapping/SignSymbolLayer.js, line 468

根据标牌json创建标牌。

getEditable(){boolean}

leaflet/mapping/SignSymbolLayer.js, line 370

获取图层的可编辑。

Returns:
Type Description
boolean 返回图层是否可编辑。

getJSONData(){Object}

leaflet/mapping/SignSymbolLayer.js, line 455

获取标牌json数据。

Returns:
Type Description
Object 标牌json数据。

getLocked(){boolean}

leaflet/mapping/SignSymbolLayer.js, line 393

获取图层的可锁定。

Returns:
Type Description
boolean 返回图层是否锁定。

getSelected(){boolean}

leaflet/mapping/SignSymbolLayer.js, line 347

获取图层的可选择。

Returns:
Type Description
boolean 返回图层是否可选择。

getSignSymbols(){Array.<SignSymbol>}

leaflet/mapping/SignSymbolLayer.js, line 434

获取当前图层所有的标牌。

Returns:
Type Description
Array.<SignSymbol> 返回当前图层所有的标牌。

getVisibility(){boolean}

leaflet/mapping/SignSymbolLayer.js, line 416

获取图层的可见性。

Returns:
Type Description
boolean 返回图层是否可见。

removeAllFeatures(){Boolean}

leaflet/mapping/SignSymbolLayer.js, line 263

移除所有标牌。

Returns:
Type Description
Boolean 成功返回True 否则返回False。

removeFeatures(signSymbols){Boolean}

leaflet/mapping/SignSymbolLayer.js, line 224

移除标牌。

Name Type Description
signSymbols Array.<SignSymbol>

标牌对象。

Returns:
Type Description
Boolean 成功返回True 否则返回False。

setEditable(isEditable)

leaflet/mapping/SignSymbolLayer.js, line 379

设置图层的可编辑。

Name Type Description
isEditable boolean

图层是否可编辑。

setLocked(isLocked)

leaflet/mapping/SignSymbolLayer.js, line 402

设置图层的可锁定。

Name Type Description
isLocked boolean

图层的锁定。

setSelected(isSelected)

leaflet/mapping/SignSymbolLayer.js, line 356

设置图层的可选择。

Name Type Description
isSelected boolean

图层是否可选择。

setSelectedSignSymbol(){SignSymbol}

leaflet/mapping/SignSymbolLayer.js, line 442

设置选中标牌。

Returns:
Type Description
SignSymbol 标牌。

setVisibility(visibility)

leaflet/mapping/SignSymbolLayer.js, line 425

设置图层可见性,设置图层的隐藏、显示、重绘的相应可见标记。

Name Type Description
visibility boolean

是否显示图层(当前地图的resolution在最大最小resolution之间)。