L.supermap.plotting.plottingLayer(name, serverUrl, options)
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
标绘图层名称。 |
||||||||||||||||||||||||
serverUrl |
string |
标绘服务地址。 |
||||||||||||||||||||||||
options |
Object |
标绘图层参数。
|
Methods
-
addFeatures(features)
leaflet/mapping/PlottingLayer.js, line 194 -
添加标号。
Name Type Description features
Array.<L.supermap.plotting.PlottingObject> 待添加的标号。
-
createAirDeployment(associatedUuid, subSymbols, uuid, style, options, callback, custom)
leaflet/mapping/PlottingLayer.js, line 759 -
创建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 880 -
创建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 929 -
创建扇形区域(空域、海域、电子卫星覆盖区域、雷达覆盖范围),此接口为异步接口没有返回值,通过 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 904 -
创建多旗。
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 419 -
创建组合对象。
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 463 -
创建干扰波束。
Name Type Description associatedUuid
string 关联实体对象的唯一ID,即创建该关联实体时的uuid。
positionPoints
Array.<L.LatLng> 标号位置点,高度可以由 L.LatLng 的tag值保存。
uuid
string 实体的唯一标识。
style
style 指定标号的样式。
options
Object 指定标号的属性,扩展参数。
custom
Object 用户的自定义属性。
-
createMissileRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)
leaflet/mapping/PlottingLayer.js, line 856 -
创建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 685 -
创建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 833 -
创建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 485 -
创建卫星,此接口为异步接口没有返回值,通过 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 554 -
根据卫星轨迹点序号或者时间创建卫星可见时间窗口。(当时间窗类型没有传入,不创建时间窗口)
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 578 -
根据卫星轨迹点序号创建卫星可见时间窗口。
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 607 -
根据卫星轨迹时刻创建卫星可见时间窗口。
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 241 -
根据屏幕坐标绘制标号,此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description libID
number 标号库ID。
code
number 标号代码。
latlngs
Array.<L.LatLng> 标号位置点。
uuid
string 标号唯一标识。
style
style 指定标号的样式。
options
Object 指定标号的属性。
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 636 -
创建对象标注。
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 661 -
创建对象标注(带指示线)。
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 994 -
根据 GeoJson 串返回标绘对象。
Name Type Description geoJson
string 需要转换标绘对象的GeoJson串。
callback
function 可选 回调函数。
-
getEditable(){boolean}
leaflet/mapping/PlottingLayer.js, line 89 -
获取图层的可编辑。
Returns:
Type Description boolean 返回图层是否可编辑。 -
getFeatureByUuid(uuid){L.supermap.plotting.PlottingObject}
leaflet/mapping/PlottingLayer.js, line 172 -
根据用户定义的唯一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 224 -
获取当前图层所有的矢量要素。
Returns:
Type Description Array.<L.supermap.plotting.PlottingObject> 返回当前图层所有的矢量要素。 -
getLocked(){boolean}
leaflet/mapping/PlottingLayer.js, line 114 -
获取图层的可锁定。
Returns:
Type Description boolean 返回图层是否锁定。 -
getSelected(){boolean}
leaflet/mapping/PlottingLayer.js, line 61 -
获取图层的可选择。
Returns:
Type Description boolean 返回图层是否可选择。 -
getVisibility(){boolean}
leaflet/mapping/PlottingLayer.js, line 139 -
获取图层的可见性。
Returns:
Type Description boolean 返回图层是否可见。 -
removeAllFeatures()
leaflet/mapping/PlottingLayer.js, line 233 -
清除当前图层所有的矢量要素。
-
removeFeatures(features)
leaflet/mapping/PlottingLayer.js, line 211 -
从当前图层中删除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 98 -
设置图层的可编辑。
Name Type Description isEditable
boolean 图层是否可编辑。
-
setLocked(isLocked)
leaflet/mapping/PlottingLayer.js, line 123 -
设置图层的可锁定。
Name Type Description isLocked
boolean 图层的锁定。
-
setSelected(isSelected)
leaflet/mapping/PlottingLayer.js, line 70 -
设置图层的可选择。
Name Type Description isSelected
boolean 图层是否可选择。
-
setVisibility(visibility)
leaflet/mapping/PlottingLayer.js, line 148 -
设置图层可见性,设置图层的隐藏、显示、重绘的相应可见标记。
Name Type Description visibility
boolean 是否显示图层(当前地图的resolution在最大最小resolution之间)。
-
unGroupObject(layer){Array.<L.supermap.plotting.GraphicObject>}
leaflet/mapping/PlottingLayer.js, line 445 -
解绑组合对象。
Name Type Description layer
L.supermap.plotting.groupObject 组合对象。
Returns:
Type Description Array.<L.supermap.plotting.GraphicObject> 标号对象。