Class: plottingLayer

L.supermap.plotting.plottingLayer

标绘图层。

L.supermap.plotting.plottingLayer(name, serverUrl, options)

leaflet/mapping/PlottingLayer.js, line 14
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 float 0 可选

图层最小可见比例尺。

maxVisibleScale float 0 可选

图层最大可见比例尺。

symScaleDefinition float null 可选

图层的缩放基准,默认是标绘图的缩放基准。

serviceParams Object

标绘服务的服务参数。

Name Type Default Description
proxy string 可选

服务代理地址。

serverType SuperMap.ServerType SuperMap.ServerType.ISERVER 可选

服务来源 ISERVER|IPORTAL|ONLINE。

withCredentials boolean false 可选

请求是否携带 cookie。

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Methods

L.supermap.plotting.plottingLayer.addChildPlotLayer(childPlotLayer)

leaflet/mapping/PlottingLayer.js, line 99

添加子图层。

Name Type Description
childPlotLayer L.supermap.plotting.childPlotLayer

要添加的子图层。

L.supermap.plotting.plottingLayer.clearVisibleScale()

leaflet/mapping/PlottingLayer.js, line 203

取消可见范围设置。

L.supermap.plotting.plottingLayer.getChildPlotLayers(){Array.<L.supermap.plotting.childPlotLayer>}

leaflet/mapping/PlottingLayer.js, line 127

获取子图层数组。

Returns:
Type Description
Array.<L.supermap.plotting.childPlotLayer> 子图层数组。

L.supermap.plotting.plottingLayer.getMaxVisibleScale(){float}

leaflet/mapping/PlottingLayer.js, line 178

获取图层的最大可见比例尺。

Returns:
Type Description
float 图层的最大可见比例尺。

L.supermap.plotting.plottingLayer.getMinVisibleScale(){float}

leaflet/mapping/PlottingLayer.js, line 153

获取图层的最小可见比例尺。

Returns:
Type Description
float 图层的最小可见比例尺。

L.supermap.plotting.plottingLayer.removeChildPlotLayer(childPlotLayer)

leaflet/mapping/PlottingLayer.js, line 136

删除子图层。

Name Type Description
childPlotLayer L.supermap.plotting.childPlotLayer

要删除的子图层。

L.supermap.plotting.plottingLayer.setMaxVisibleScale(maxVisibleScale)

leaflet/mapping/PlottingLayer.js, line 191

设置图层的最大可见比例尺。

Name Type Description
maxVisibleScale float

图层的最大可见比例尺。

L.supermap.plotting.plottingLayer.setMinVisibleScale(minVisibleScale)

leaflet/mapping/PlottingLayer.js, line 166

设置图层的最小可见比例尺。

Name Type Description
minVisibleScale float

图层的最小可见比例尺。

addFeatures(features)

leaflet/mapping/PlottingLayer.js, line 382

添加标号。

Name Type Description
features Array.<L.supermap.plotting.PlottingObject>

待添加的标号。

createAirDeployment(associatedUuid, subSymbols, uuid, style, options, callback, custom)

leaflet/mapping/PlottingLayer.js, line 1032

创建KJBL部署,此接口为异步接口没有返回值,通过 callback 回调函数处理创建完成后操作。

Name Type Description
associatedUuid string

KJBL部署关联的实体对象的唯一ID,即创建该关联实体时的uuid。

subSymbols Array.<SuperMap.Plot.SubSymbol>

标号的libID、code及textContent信息。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。

Name Type Default Description
colNum number 1 可选

KJBL部署排列的列数,默认为1。

space number 10 可选

行列之间的间距,默认是10,单位是:0.1mm。

isShowTooltip boolean true 可选

是否显示指示框,默认为显示。

callback function

回调函数。

custom Object

用户的自定义属性。

createAirRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)

leaflet/mapping/PlottingLayer.js, line 1153

创建KJ航线。

Name Type Description
arrRoutePts Array.<L.LatLng>

航线点串。

routeNodes Array.<SuperMap.Plot.RouteNode>

航站点数组。

uuid string

实体的唯一标识。

lineStyle style

航线的样式。

options Object

指定标号的属性,扩展参数。

custom Object

用户的自定义属性。

createArcRegion(centerPoint, radius, startAngle, endAngle, textContent, textPos, uuid, style, options, callback, custom)

leaflet/mapping/PlottingLayer.js, line 1202

创建扇形区域(空域、海域、电子卫星覆盖区域、雷达覆盖范围),此接口为异步接口没有返回值,通过 callback 回调函数处理创建完成后操作。

Name Type Description
centerPoint L.LatLng

扇形区域的中心点。

radius string

扇形区域的半径。

startAngle number

扇形区域的起始角。

endAngle number

扇形区域的结束角。

textContent string

扇形区域说明。

textPos number

扇形区域说明的位置,为文字角度,-1代表中心点。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。

Name Type Description
radiusText string 可选

半径文字。

radiusPosAngle number 可选

半径线文字角度。

radiusLineType SuperMap.Plot.RadiusLineType 可选

半径线类型。

callback function 可选

回调函数。

custom Object

用户的自定义属性。

createFlags(features, ratio, uuid)

leaflet/mapping/PlottingLayer.js, line 1177

创建多旗。

Name Type Description
features Array.<L.supermap.plotting.GraphicObject>

旗帜标号。

ratio number

多旗间距与旗子高度的比值,默认是0.8。

uuid string

组合对象的唯一ID或FeatureId。

createGroupObject(features, uuid){L.supermap.plotting.groupObject}

leaflet/mapping/PlottingLayer.js, line 663

创建组合对象。

Name Type Description
features Array.<L.supermap.plotting.GraphicObject>

标号对象。

uuid string

标号唯一标识。

Returns:
Type Description
L.supermap.plotting.groupObject 组合对象。

createInterferenceBeam(associatedUuid, positionPoints, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 734

创建干扰波束。

Name Type Description
associatedUuid string

关联实体对象的唯一ID,即创建该关联实体时的uuid。

positionPoints Array.<L.LatLng>

标号位置点,高度可以由 L.LatLng 的tag值保存。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性,扩展参数。

custom Object

用户的自定义属性。

createLineRelation(startAssociatedUuid, endAssociatedUuid, lineRelationType, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 707

创建对象间(打击、侦察、干扰等)关系连线。

Name Type Description
startAssociatedUuid String

关联对象的唯一ID。

endAssociatedUuid String

关联对象的唯一ID。

lineRelationType SuperMap.Plot.LineRelationType

连接线类型。

uuid string

标号唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。

Name Type Default Description
subSectionCount number 10 可选

连接线划分段数,默认为10。

custom Object

用户的自定义属性。

createMissileRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)

leaflet/mapping/PlottingLayer.js, line 1129

创建DD航线。

Name Type Description
arrRoutePts Array.<L.LatLng>

航线点串。

routeNodes Array.<SuperMap.Plot.RouteNode>

航站点数组。

uuid string

实体的唯一标识。

lineStyle style

航线的样式。

options Object

指定标号的属性,扩展参数。

custom Object

用户的自定义属性。

createNavyDeployment(associatedUuid, subSymbols, uuid, style, options, callback, custom)

leaflet/mapping/PlottingLayer.js, line 958

创建HJBL部署,此接口为异步接口没有返回值,通过 callback 回调函数处理创建完成后操作。

Name Type Description
associatedUuid string

HJBL部署关联的实体对象的唯一ID,即创建该关联实体时的uuid。

subSymbols Array.<SuperMap.Plot.SubSymbol>

标号的libID、code及textContent信息。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。

Name Type Default Description
colNum number 1 可选

HJBL部署排列的列数,默认为1。

space number 10 可选

行列之间的间距,默认是10,单位是:0.1mm。

textContent string 可选

注记内容。

callback function 可选

回调函数。

custom Object

用户的自定义属性。

createNavyRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)

leaflet/mapping/PlottingLayer.js, line 1106

创建HJ航线。

Name Type Description
arrRoutePts Array.<L.LatLng>

航线点串。

routeNodes Array.<SuperMap.Plot.RouteNode>

航站点数组。

uuid string

实体的唯一标识

lineStyle style

航线的样式。

options Object

指定标号的属性,扩展参数。

custom Object

用户的自定义属性。

createSatellite(libID, code, orbitPoints, textContent, uuid, style, options, callback, custom)

leaflet/mapping/PlottingLayer.js, line 756

创建卫星,此接口为异步接口没有返回值,通过 callback 回调函数处理创建完成后操作。

Name Type Description
libID number

标号库ID。

code number

标号代码。

orbitPoints Array.<SuperMap.Plot.OrbitPoint>

卫星轨道星下点轨迹。

textContent string

卫星说明。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。

Name Type Default Description
visible boolean true 可选

卫星轨道的可见性,默认为可见。

callback function 可选

回调函数。

custom Object

用户的自定义属性。

createSatelliteTimeWindows(associatedUuid, timeWindows, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 827

根据卫星轨迹点序号或者时间创建卫星可见时间窗口。(当时间窗类型没有传入,不创建时间窗口)

Name Type Description
associatedUuid string

关联的卫星的唯一ID,即创建该关联实体时的uuid。

timeWindows Arrary.<SuperMap.Plot.TimeWindowParameter>

卫星可见时间窗(起始轨道点序号或时间、结束轨道点序号或时间、轨道类型序号或时间)数组。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。保留参数。

custom Object

用户的自定义属性。

createSatelliteTimeWindows1(associatedUuid, timeWindows, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 851

根据卫星轨迹点序号创建卫星可见时间窗口。

Name Type Description
associatedUuid string

关联的卫星的唯一ID,即创建该关联实体时的uuid。

timeWindows Arrary.<SuperMap.Plot.TimeWindowParameter>

卫星可见时间窗(起始、结束轨道点序号)数组。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。保留参数。

custom Object

用户的自定义属性。

createSatelliteTimeWindows2(associatedUuid, timeWindows, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 880

根据卫星轨迹时刻创建卫星可见时间窗口。

Name Type Description
associatedUuid string

关联的卫星的唯一ID,即创建该关联实体时的uuid。

timeWindows Arrary.<SuperMap.Plot.TimeWindowParameter>

卫星可见时间窗(起始、结束轨道点时间)数组。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。保留参数。

custom Object

用户的自定义属性。

createSymbol(libID, code, latlngs, uuid, style, options, callback, custom)

leaflet/mapping/PlottingLayer.js, line 471

根据屏幕坐标绘制标号,此接口为异步接口没有返回值,通过 callback 回调函数处理创建完成后操作。

Name Type Description
libID number

标号库ID。

code number

标号代码。

latlngs Array.<L.LatLng>

标号位置点。

uuid string

标号唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。此处仅列出部分标号属性,不同类型标号可设置属性不同,具体可以参照标绘对象的options属性。例如:点标号,可参考:L.supermap.plotting.dotSymbol; 线面标号,可参考:L.supermap.plotting.algoSymbol; 沿线注记,可参考:L.supermap.plotting.pathText 等等

Name Type Default Description
dRotate number 0 可选

点标号旋转角度,默认为0。

scaleByMap boolean false 可选

标号是否随图缩放,默认为false。

maxScale number 5 可选

标号最大缩放比例,默认为5。

minScale number 1 可选

标号最小缩放比例,默认为1。

negativeImage boolean false 可选

是否启用镜像,默认为false。

positionOffset boolean false 可选

位置点偏移,默认为false。

positionOffsetType number 可选

偏移线类型,有两种类型:0直线,1线粗渐变。(当positionOffset属性为true时,设置该属性有效。)

positionOffsetX number 可选

点标号X方向偏移量。

positionOffsetY number 可选

点标号Y方向偏移量。

space number 7 可选

注记与标号的距离,默认为7。

surroundLineType number 可选

衬线类型,点标号有两种类型:0无衬线,1有衬线;线面标号有四种类型:0无衬线,1内侧衬线,2外侧衬线,3双侧衬线。

textContent string 可选

标号注记内容。

textDisplay boolean true 可选

注记是否显示,默认为true。

textPosition number true 可选

注记位置,注记相对于点标号的位置有:0左上,1左下,2右上,3右下,4上,5下,6左,7右,8中间。

callback function 可选

回调函数。

custom Object

用户的自定义属性。

createSymbolText(associatedUuid, symbolTexts, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 909

创建对象标注。

Name Type Description
associatedUuid string

关联实体对象的唯一ID,即创建该关联实体时的uuid。

symbolTexts Array.<SuperMap.Plot.SymbolText>

文字内容的数组。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性。

Name Type Default Description
addFrame boolean false 可选

是否添加边框线,默认为false。

custom Object

用户的自定义属性。

createSymbolText1(associatedUuid, textContents, uuid, style, options, custom)

leaflet/mapping/PlottingLayer.js, line 934

创建对象标注(带指示线)。

Name Type Description
associatedUuid string

关联实体对象的唯一ID,即创建该关联实体时的uuid。

textContents Array(string)

文字内容的数组。

uuid string

实体的唯一标识。

style style

指定标号的样式。

options Object

指定标号的属性,扩展参数。

custom Object

用户的自定义属性。

geoJsonToFeature(geoJson, callback)

leaflet/mapping/PlottingLayer.js, line 1271

根据 GeoJson 串返回标绘对象。

Name Type Description
geoJson string

需要转换标绘对象的GeoJson串。

callback function 可选

回调函数。

getEditable(){boolean}

leaflet/mapping/PlottingLayer.js, line 240

获取图层的可编辑。

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

getFeatureByUuid(uuid){L.supermap.plotting.PlottingObject}

leaflet/mapping/PlottingLayer.js, line 360

根据用户定义的唯一ID获取图层上指定的feature。

Name Type Description
uuid string

用户定义的唯一ID。

Returns:
Type Description
L.supermap.plotting.PlottingObject 返回图层上指定的feature。

getFeatures(){Array.<L.supermap.plotting.PlottingObject>}

leaflet/mapping/PlottingLayer.js, line 448

获取当前图层所有的矢量要素。

Returns:
Type Description
Array.<L.supermap.plotting.PlottingObject> 返回当前图层所有的矢量要素。

getLocked(){boolean}

leaflet/mapping/PlottingLayer.js, line 265

获取图层的可锁定。

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

getSelected(){boolean}

leaflet/mapping/PlottingLayer.js, line 212

获取图层的可选择。

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

getVisibility(){boolean}

leaflet/mapping/PlottingLayer.js, line 290

获取图层的可见性。

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

removeAllFeatures()

leaflet/mapping/PlottingLayer.js, line 457

清除当前图层所有的矢量要素。

removeFeatures(features)

leaflet/mapping/PlottingLayer.js, line 423

从当前图层中删除feature。这个函数擦除所有传递进来的矢量要素。 参数中的feature数组中的每一项,必须是已经添加到当前图层中的feature, 如果无法确定feature数组,则可以调用removeAllFeatures来删除所有feature。 如果要删除的feature数组中的元素特别多,推荐使用removeAllFeatures, 删除所有feature后再重新添加。这样效率会更高。

Name Type Description
features Array.<L.supermap.plotting.PlottingObject>

要删除feature的数组。

setEditable(isEditable)

leaflet/mapping/PlottingLayer.js, line 249

设置图层的可编辑。

Name Type Description
isEditable boolean

图层是否可编辑。

setLocked(isLocked)

leaflet/mapping/PlottingLayer.js, line 274

设置图层的可锁定。

Name Type Description
isLocked boolean

图层的锁定。

setSelected(isSelected)

leaflet/mapping/PlottingLayer.js, line 221

设置图层的可选择。

Name Type Description
isSelected boolean

图层是否可选择。

setVisibility(visibility)

leaflet/mapping/PlottingLayer.js, line 299

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

Name Type Description
visibility boolean

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

unGroupObject(layer){Array.<L.supermap.plotting.GraphicObject>}

leaflet/mapping/PlottingLayer.js, line 689

解绑组合对象。

Name Type Description
layer L.supermap.plotting.groupObject

组合对象。

Returns:
Type Description
Array.<L.supermap.plotting.GraphicObject> 标号对象。