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 featuresArray.<L.supermap.plotting.PlottingObject> 待添加的标号。
-
createAirDeployment(associatedUuid, subSymbols, uuid, style, options, callback, custom)
leaflet/mapping/PlottingLayer.js, line 759 -
创建KJBL部署,此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description associatedUuidstring KJBL部署关联的实体对象的唯一ID,即创建该关联实体时的uuid
subSymbolsArray.<SuperMap.Plot.SubSymbol> 标号的libID、code及textContent信息。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description colNumnumber 1 可选 KJBL部署排列的列数,默认为1。
spacenumber 10 可选 行列之间的间距,默认是10,单位是:0.1mm。
isShowTooltipboolean true 可选 是否显示指示框,默认为显示。
callbackfunction 回调函数。
customObject 用户的自定义属性
-
createAirRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)
leaflet/mapping/PlottingLayer.js, line 880 -
创建KJ航线。
Name Type Description arrRoutePtsArray.<L.LatLng> 航线点串。
routeNodesArray.<SuperMap.Plot.RouteNode> 航站点数组。
uuidstring 实体的唯一标识。
lineStylestyle 航线的样式。
optionsObject 指定标号的属性,扩展参数。
customObject 用户的自定义属性。
-
createArcRegion(centerPoint, radius, startAngle, endAngle, textContent, textPos, uuid, style, options, callback, custom)
leaflet/mapping/PlottingLayer.js, line 929 -
创建扇形区域(空域、海域、电子卫星覆盖区域、雷达覆盖范围),此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description centerPointL.LatLng 扇形区域的中心点。
radiusstring 扇形区域的半径。
startAnglenumber 扇形区域的起始角。
endAnglenumber 扇形区域的结束角。
textContentstring 扇形区域说明。
textPosnumber 扇形区域说明的位置,为文字角度,-1代表中心点。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Description radiusTextstring 可选 半径文字。
radiusPosAnglenumber 可选 半径线文字角度。
radiusLineTypeSuperMap.Plot.RadiusLineType 可选 半径线类型。
callbackfunction 可选 回调函数。
customObject 用户的自定义属性。
-
createFlags(features, ratio, uuid)
leaflet/mapping/PlottingLayer.js, line 904 -
创建多旗。
Name Type Description featuresArray.<L.supermap.plotting.GraphicObject> 旗帜标号。
rationumber 多旗间距与旗子高度的比值,默认是0.8
uuidstring 组合对象的唯一ID或FeatureId。
-
createGroupObject(features, uuid){L.supermap.plotting.groupObject}
leaflet/mapping/PlottingLayer.js, line 419 -
创建组合对象。
Name Type Description featuresArray.<L.supermap.plotting.GraphicObject> 标号对象。
uuidstring 标号唯一标识。
Returns:
Type Description L.supermap.plotting.groupObject 组合对象。 -
createInterferenceBeam(associatedUuid, positionPoints, uuid, style, options, custom)
leaflet/mapping/PlottingLayer.js, line 463 -
创建干扰波束。
Name Type Description associatedUuidstring 关联实体对象的唯一ID,即创建该关联实体时的uuid。
positionPointsArray.<L.LatLng> 标号位置点,高度可以由 L.LatLng 的tag值保存。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性,扩展参数。
customObject 用户的自定义属性。
-
createMissileRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)
leaflet/mapping/PlottingLayer.js, line 856 -
创建DD航线。
Name Type Description arrRoutePtsArray.<L.LatLng> 航线点串。
routeNodesArray.<SuperMap.Plot.RouteNode> 航站点数组。
uuidstring 实体的唯一标识。
lineStylestyle 航线的样式。
optionsObject 指定标号的属性,扩展参数。
customObject 用户的自定义属性。
-
createNavyDeployment(associatedUuid, subSymbols, uuid, style, options, callback, custom)
leaflet/mapping/PlottingLayer.js, line 685 -
创建HJBL部署,此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description associatedUuidstring HJBL部署关联的实体对象的唯一ID,即创建该关联实体时的uuid。
subSymbolsArray.<SuperMap.Plot.SubSymbol> 标号的libID、code及textContent信息。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description colNumnumber 1 可选 HJBL部署排列的列数,默认为1。
spacenumber 10 可选 行列之间的间距,默认是10,单位是:0.1mm。
textContentstring 可选 注记内容。
callbackfunction 可选 回调函数。
customObject 用户的自定义属性。
-
createNavyRoute(arrRoutePts, routeNodes, uuid, lineStyle, options, custom)
leaflet/mapping/PlottingLayer.js, line 833 -
创建HJ航线。
Name Type Description arrRoutePtsArray.<L.LatLng> 航线点串。
routeNodesArray.<SuperMap.Plot.RouteNode> 航站点数组。
uuidstring 实体的唯一标识
lineStylestyle 航线的样式。
optionsObject 指定标号的属性,扩展参数。
customObject 用户的自定义属性。
-
createSatellite(libID, code, orbitPoints, textContent, uuid, style, options, callback, custom)
leaflet/mapping/PlottingLayer.js, line 485 -
创建卫星,此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description libIDnumber 标号库ID。
codenumber 标号代码。
orbitPointsArray.<SuperMap.Plot.OrbitPoint> 卫星轨道星下点轨迹。
textContentstring 卫星说明。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description visibleboolean true 可选 卫星轨道的可见性,默认为可见。
callbackfunction 可选 回调函数。
customObject 用户的自定义属性。
-
createSatelliteTimeWindows(associatedUuid, timeWindows, uuid, style, options, custom)
leaflet/mapping/PlottingLayer.js, line 554 -
根据卫星轨迹点序号或者时间创建卫星可见时间窗口。(当时间窗类型没有传入,不创建时间窗口)
Name Type Description associatedUuidstring 关联的卫星的唯一ID,即创建该关联实体时的uuid。
timeWindowsArrary.<SuperMap.Plot.TimeWindowParameter> 卫星可见时间窗(起始轨道点序号或时间、结束轨道点序号或时间、轨道类型序号或时间)数组。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。保留参数。
customObject 用户的自定义属性。
-
createSatelliteTimeWindows1(associatedUuid, timeWindows, uuid, style, options, custom)
leaflet/mapping/PlottingLayer.js, line 578 -
根据卫星轨迹点序号创建卫星可见时间窗口。
Name Type Description associatedUuidstring 关联的卫星的唯一ID,即创建该关联实体时的uuid。
timeWindowsArrary.<SuperMap.Plot.TimeWindowParameter> 卫星可见时间窗(起始、结束轨道点序号)数组。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。保留参数。
customObject 用户的自定义属性。
-
createSatelliteTimeWindows2(associatedUuid, timeWindows, uuid, style, options, custom)
leaflet/mapping/PlottingLayer.js, line 607 -
根据卫星轨迹时刻创建卫星可见时间窗口。
Name Type Description associatedUuidstring 关联的卫星的唯一ID,即创建该关联实体时的uuid。
timeWindowsArrary.<SuperMap.Plot.TimeWindowParameter> 卫星可见时间窗(起始、结束轨道点时间)数组。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。保留参数。
customObject 用户的自定义属性。
-
createSymbol(libID, code, latlngs, uuid, style, options, callback, custom)
leaflet/mapping/PlottingLayer.js, line 241 -
根据屏幕坐标绘制标号,此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description libIDnumber 标号库ID。
codenumber 标号代码。
latlngsArray.<L.LatLng> 标号位置点。
uuidstring 标号唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description dRotatenumber 0 可选 点标号旋转角度,默认为0。
scaleByMapboolean false 可选 标号是否随图缩放,默认为false。
maxScalenumber 5 可选 标号最大缩放比例,默认为5。
minScalenumber 1 可选 标号最小缩放比例,默认为1。
negativeImageboolean false 可选 是否启用镜像,默认为false。
positionOffsetboolean false 可选 位置点偏移,默认为false。
positionOffsetTypenumber 可选 偏移线类型,有两种类型:0直线,1线粗渐变。(当positionOffset属性为true时,设置该属性有效。)
positionOffsetXnumber 可选 点标号X方向偏移量。
positionOffsetYnumber 可选 点标号Y方向偏移量。
spacenumber 7 可选 注记与标号的距离,默认为7。
surroundLineTypenumber 可选 衬线类型,点标号有两种类型:0无衬线,1有衬线;线面标号有四种类型:0无衬线,1内侧衬线,2外侧衬线,3双侧衬线。
textContentstring 可选 标号注记内容。
textDisplayboolean true 可选 注记是否显示,默认为true。
textPositionnumber true 可选 注记位置,注记相对于点标号的位置有:0左上,1左下,2右上,3右下,4上,5下,6左,7右,8中间。
callbackfunction 可选 回调函数。
customObject 用户的自定义属性。
-
createSymbolText(associatedUuid, symbolTexts, uuid, style, options, custom)
leaflet/mapping/PlottingLayer.js, line 636 -
创建对象标注。
Name Type Description associatedUuidstring 关联实体对象的唯一ID,即创建该关联实体时的uuid。
symbolTextsArray.<SuperMap.Plot.SymbolText> 文字内容的数组。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description addFrameboolean false 可选 是否添加边框线,默认为false。
customObject 用户的自定义属性。
-
createSymbolText1(associatedUuid, textContents, uuid, style, options, custom)
leaflet/mapping/PlottingLayer.js, line 661 -
创建对象标注(带指示线)。
Name Type Description associatedUuidstring 关联实体对象的唯一ID,即创建该关联实体时的uuid。
textContentsArray(string) 文字内容的数组。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性,扩展参数。
customObject 用户的自定义属性。
-
geoJsonToFeature(geoJson, callback)
leaflet/mapping/PlottingLayer.js, line 994 -
根据 GeoJson 串返回标绘对象。
Name Type Description geoJsonstring 需要转换标绘对象的GeoJson串。
callbackfunction 可选 回调函数。
-
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 uuidstring 用户定义的唯一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 featuresArray.<L.supermap.plotting.PlottingObject> 要删除feature的数组
-
setEditable(isEditable)
leaflet/mapping/PlottingLayer.js, line 98 -
设置图层的可编辑。
Name Type Description isEditableboolean 图层是否可编辑。
-
setLocked(isLocked)
leaflet/mapping/PlottingLayer.js, line 123 -
设置图层的可锁定。
Name Type Description isLockedboolean 图层的锁定。
-
setSelected(isSelected)
leaflet/mapping/PlottingLayer.js, line 70 -
设置图层的可选择。
Name Type Description isSelectedboolean 图层是否可选择。
-
setVisibility(visibility)
leaflet/mapping/PlottingLayer.js, line 148 -
设置图层可见性,设置图层的隐藏、显示、重绘的相应可见标记。
Name Type Description visibilityboolean 是否显示图层(当前地图的resolution在最大最小resolution之间)。
-
unGroupObject(layer){Array.<L.supermap.plotting.GraphicObject>}
leaflet/mapping/PlottingLayer.js, line 445 -
解绑组合对象。
Name Type Description layerL.supermap.plotting.groupObject 组合对象。
Returns:
Type Description Array.<L.supermap.plotting.GraphicObject> 标号对象。