new MovingTargetLayer(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.MovingTargetLayer(name, serverUrl, options);
// 另一种写法
L.supermap.plotting.movingTargetLayer(name, serverUrl, options);
</script>
// ES6 Import
import { MovingTargetLayer } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new MovingTargetLayer(name, serverUrl, options);
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
动目标图层名称。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
serverUrl |
string |
标绘服务地址。 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
动目标图层参数。
|
Extends
Members
-
featuresArray.<PlottingObject>
-
标号对象
-
serverUrlstring
-
表示标绘服务的URI
Methods
-
addFeatures(features)
leaflet/mapping/MovingTargetLayer.js, line 2037 -
添加标号对象。
Name Type Description featuresArray.<GraphicObject> 标号对象。
-
createAim(viewAssociatedUuid, associatedUuid, options){Aim}
leaflet/mapping/MovingTargetLayer.js, line 235 -
通过标号关联id创建瞄准特效。
Name Type Description viewAssociatedUuidstring 观察点关联标号id
associatedUuidstring 瞄准点关联标号id
optionsobject 瞄准参数
Name Type Description loopboolean 可选 瞄准闪烁是否循环。
barkTimesnumber 可选 瞄准闪烁次数,若循环则不生效。
barkIntervalnumber 可选 瞄准闪烁间隔时间,单为毫秒
radiusnumber 可选 瞄准对象半径
radiusUnitboolean 可选 瞄准圆半径单位类型(默认为像素)。
styleObject 可选 瞄准样式。
Name Type Description aimTargetColorstring 可选 瞄准颜色。
aimLineColorstring 可选 瞄准线颜色。
aimLineWeightnumber 可选 瞄准线线宽。
aimLineOpacitynumber 可选 瞄准线透明度。
aimLineDashArraynumber 可选 瞄准线虚线间隔长度。
Returns:
Type Description Aim 瞄准对象 -
createAimByPosition(latlngs, options){Aim}
leaflet/mapping/MovingTargetLayer.js, line 263 -
通过位置点创建瞄准特效。
Name Type Description latlngsArray.<L.LatLng> 瞄准起始点位置数组
optionsobject 瞄准参数
Name Type Description barkTimesnumber 可选 瞄准闪烁次数,若循环则不生效。
barkIntervalnumber 可选 瞄准闪烁间隔时间,单为毫秒
radiusnumber 可选 瞄准对象半径
radiusUnitboolean 可选 瞄准圆半径单位类型(默认为像素)。
styleObject 可选 瞄准样式。
Name Type Description aimTargetColorstring 可选 瞄准颜色。
aimLineColorstring 可选 瞄准线颜色。
aimLineWeightnumber 可选 瞄准线线宽。
aimLineOpacitynumber 可选 瞄准线透明度。
aimLineDashArraynumber 可选 瞄准线虚线间隔长度。
Returns:
Type Description Aim 瞄准对象 -
createBoom(associatedUuid, options){Boom}
leaflet/mapping/MovingTargetLayer.js, line 289 -
通过标号关联id创建爆炸特效。
Name Type Description associatedUuidstring 关联标号id
optionsobject 爆炸参数
Name Type Description boomTimesobject 可选 爆炸次数
Returns:
Type Description Boom 爆炸对象 -
createBoomByPosition(latlng, options){Boom}
leaflet/mapping/MovingTargetLayer.js, line 306 -
通过位置点创建爆炸特效。
Name Type Description latlngL.LatLng 爆炸位置点
optionsobject 爆炸参数
Name Type Description boomTimesobject 可选 爆炸次数
Returns:
Type Description Boom 爆炸对象 -
createCommunicationLink(senderUuid, receiverUuid, options){CommunicationLink}
leaflet/mapping/MovingTargetLayer.js, line 323 -
通过标号关联id数组创建通讯链路特效。
Name Type Description senderUuidstring 通讯链路发送信号的标号uuid
receiverUuidstring 通讯链路接收信号的标号uuid
optionsobject 通讯链路参数
Name Type Description dashSpeednumber 可选 通讯链路移动速度。
styleObject 可选 通讯链路样式。
Name Type Description weightnumber 可选 通讯链路线宽。
movePathColorstring 可选 通讯链路移动线路颜色。
movePathOpacitynumber 可选 通讯链路移动线路透明度。
dashArraystring 可选 通讯链路短线与间隔的长度。
staticPathColorstring 可选 通讯链路静态线路颜色。
staticPathOpacitynumber 可选 通讯链路静态线路透明度。
Returns:
Type Description CommunicationLink 通讯链路对象 -
createCommunicationLinkByPosition(senderLatLng, receiverLatLng, options){CommunicationLink}
leaflet/mapping/MovingTargetLayer.js, line 348 -
通过位置点创建通讯链路特效。
Name Type Description senderLatLngL.LatLng 通讯链路发送信号位置点
receiverLatLngL.LatLng 通讯链路接收信号位置点
optionsobject 通讯链路参数
Name Type Description dashSpeednumber 可选 通讯链路移动速度。
styleObject 可选 通讯链路样式。
Name Type Description weightnumber 可选 通讯链路线宽。
movePathColorstring 可选 通讯链路移动线路颜色。
movePathOpacitynumber 可选 通讯链路移动线路透明度。
dashArraystring 可选 通讯链路短线与间隔的长度。
staticPathColorstring 可选 通讯链路静态线路颜色。
staticPathOpacitynumber 可选 通讯链路静态线路透明度。
Returns:
Type Description CommunicationLink 通讯链路对象 -
createDestroy(associatedUuid, options){Destroy}
leaflet/mapping/MovingTargetLayer.js, line 373 -
通过标号关联id创建摧毁特效。
Name Type Description associatedUuidstring 关联标号id
optionsobject 摧毁参数
opotions.durationTimestring 可选 摧毁持续时间。
Returns:
Type Description Destroy 摧毁对象 -
createLineRelation(startAssociatedUuid, endAssociatedUuid, lineRelationType, uuid, style, options, custom){LineRelation}
leaflet/mapping/MovingTargetLayer.js, line 2491 -
创建对象间(打击、侦察、干扰等)关系连线。
Name Type Description startAssociatedUuidString 关联对象的唯一ID。
endAssociatedUuidString 关联对象的唯一ID。
lineRelationTypeLineRelationType 连接线类型。
uuidstring 标号唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description subSectionCountnumber 10 可选 连接线划分段数,默认为10。
customObject 用户的自定义属性。
Returns:
Type Description LineRelation - 连接线
-
createSectorDetectionRange(associatedUuid, options){SectorDetectionRange}
leaflet/mapping/MovingTargetLayer.js, line 499 -
通过标号关联id创建扇形扫描特效。
Name Type Description associatedUuidstring 关联标号id
optionsobject 扇形扫描参数
Name Type Description anglestring 可选 扇形开合角度
scanAnglestring 可选 扫描瓣开合角度
radiusnumber 可选 扇形扫描半径
radiusUnitboolean 可选 扇形半径单位类型(默认为像素)。
styleObject 可选 扇形风格参数。
Name Type Description fillColorstring 可选 扇形填充色。
fillOpacitystring 可选 扇形填充透明度。
opacitynumber 可选 扇形边界透明度。
colornumber 可选 扇形边界颜色。
scanStyleObject 可选 扫描风格参数。
Name Type Description fillColorstring 可选 扫描填充色。
fillOpacitystring 可选 扇形扫描填充透明度。
colornumber 可选 扇形扫描边界颜色。
opacitynumber 可选 扇形扫描边界透明度。
Returns:
Type Description SectorDetectionRange 扇形扫描对象 -
createSectorDetectionRangeByPosition(latlng, options){SectorDetectionRange}
leaflet/mapping/MovingTargetLayer.js, line 529 -
通过位置点创建扇形扫描特效。
Name Type Description latlngL.LatLng 扇形扫描位置点
optionsobject 扇形扫描参数
Name Type Description anglestring 可选 扇形开合角度
scanAnglestring 可选 扫描瓣开合角度
radiusnumber 可选 扇形扫描半径
radiusUnitboolean 可选 扇形半径单位类型(默认为像素)。
styleObject 可选 扇形风格参数。
Name Type Description fillColorstring 可选 扇形填充色。
fillOpacitystring 可选 扇形填充透明度。
opacitynumber 可选 扇形边界透明度。
colornumber 可选 扇形边界颜色。
scanStyleObject 可选 扫描风格参数。
Name Type Description fillColorstring 可选 扫描填充色。
fillOpacitystring 可选 扇形扫描填充透明度。
colornumber 可选 扇形扫描边界颜色。
opacitynumber 可选 扇形扫描边界透明度。
Returns:
Type Description SectorDetectionRange 扇形扫描对象 -
createSymbol(libID, code, latlngs, uuid, style, options, callback, custom)
leaflet/mapping/MovingTargetLayer.js, line 2269 -
根据屏幕坐标绘制标号,此接口为异步接口没有返回值,通过 callback 回掉函数处理创建完成后操作。
Name Type Description libIDnumber 标号库ID。
codenumber 标号代码。
latlngsArray.<L.LatLng> 标号位置点。
uuidstring 可选 标号唯一标识。
stylestyle 可选 标号的显示风格。
optionsObject 指定标号的属性。
Name Type Default Description serverUrlString 可选 标绘服务地址
symbolDataObject 可选 对接服务器返回的标号数据。
symbolSizeSuperMap.Size 可选 标号大小。
dRotatenumber 0 可选 点标号旋转角度,默认为0。
symbolRankSymbolRank 0 可选 点标号级别。
horizontalMirrorboolean false 可选 是否启用水平镜像,默认为false。
verticalMirrorboolean false 可选 是否启用竖直镜像,默认为false。
spacenumber 7 可选 注记与标号的距离,默认为7。
surroundLineTypenumber 可选 衬线类型,点标号有两种类型:0无衬线,1有衬线;线面标号有四种类型:0无衬线,1内侧衬线,2外侧衬线,3双侧衬线。
textContentstring 可选 标号注记内容。
textDisplayboolean true 可选 注记是否显示,默认为true。
annotationPositionAnnoPosition AnnoPosition.TOP 可选 标号的注记位置。
pictureFramesPictureFrame 可选 图片对象。
autoRotationboolean false 可选 点标号是否根据轨迹线方向自动旋转角度;
symbolTextsArray.<SymbolText> [] 可选 点标号的标牌,支持设置多个
trajectoryTrajectory null 可选 点标号的轨迹线设置
bloodVolumesArray.<BloodVolume> [] 可选 点标号的血条,支持设置多个
detectionRangeDetectionRange null 可选 点标号的探测范围,只支持动目标图层显示
callbackfunction 可选 回调函数。
customObject 用户的自定义属性。
-
createSymbolGroup(features){array}
leaflet/mapping/MovingTargetLayer.js, line 823 -
创建标号聚合对象
Name Type Description featuresarray 需要聚合的标号数组
Returns:
Type Description array 聚合标号数组 -
createSymbolText(associatedUuid, symbolText, uuid, style, options, custom)
leaflet/mapping/MovingTargetLayer.js, line 2442 -
创建对象标注。
Name Type Description associatedUuidstring 关联实体对象的唯一ID,即创建该关联实体时的uuid。
symbolTextSymbolText 文字内容。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性。
Name Type Default Description addFrameboolean false 可选 是否添加边框线,默认为false。
customObject 用户的自定义属性。
-
createSymbolText1(associatedUuid, textContents, uuid, style, options, custom)
leaflet/mapping/MovingTargetLayer.js, line 2467 -
创建对象标注(带指示线)。
Name Type Description associatedUuidstring 关联实体对象的唯一ID,即创建该关联实体时的uuid。
textContentsArray.<string> 文字内容的数组。
uuidstring 实体的唯一标识。
stylestyle 指定标号的样式。
optionsObject 指定标号的属性,扩展参数。
customObject 用户的自定义属性。
-
geoJsonToFeature(geoJson, callback)
leaflet/mapping/MovingTargetLayer.js, line 2251 -
根据 GeoJson 串返回标绘对象。
Name Type Description geoJsonstring 需要转换标绘对象的GeoJson串。
callbackfunction 可选 回调函数。
-
getAllSymbolGroups(){array}
leaflet/mapping/MovingTargetLayer.js, line 875 -
获取当前图层所有聚合对象
Returns:
Type Description array 聚合对象数组 -
getEditable(){boolean}
leaflet/mapping/MovingTargetLayer.js, line 614 -
获取图层的可编辑。
Returns:
Type Description boolean 返回图层是否可编辑。 -
getFeatureByUuid(uuid){PlottingObject}
leaflet/mapping/MovingTargetLayer.js, line 1989 -
根据用户定义的唯一ID获取图层上指定的feature。
Name Type Description uuidstring 用户定义的唯一ID。
Returns:
Type Description PlottingObject 返回图层上指定的feature。 -
getFeatures()
leaflet/mapping/MovingTargetLayer.js, line 2029 -
获取当前图层所有的矢量要素。
-
getFeaturesInBounds()
leaflet/mapping/MovingTargetLayer.js, line 2662 -
获取屏幕范围内的对象。
-
getLocked(){boolean}
leaflet/mapping/MovingTargetLayer.js, line 640 -
获取图层的可锁定。
Returns:
Type Description boolean 返回图层是否锁定。 -
getSelected(){boolean}
leaflet/mapping/MovingTargetLayer.js, line 583 -
获取图层的可选择。
Returns:
Type Description boolean 返回图层是否可选择。 -
getSpecialEffectObject(uuid){Aim|SectorDetectionRange|Boom|CommunicationLink|Destroy}
leaflet/mapping/MovingTargetLayer.js, line 569 -
获取指定特效。
Name Type Description uuidstring 特效唯一标识符
Returns:
Type Description Aim | SectorDetectionRange | Boom | CommunicationLink | Destroy 特效对象 -
getVisibility(){boolean}
leaflet/mapping/MovingTargetLayer.js, line 666 -
获取图层的可见性。
Returns:
Type Description boolean 返回图层是否可见。 -
redraw()
leaflet/mapping/MovingTargetLayer.js, line 2569 -
不更新数据重绘图层的所有对象
-
removeAllFeatures()
leaflet/mapping/MovingTargetLayer.js, line 2221 -
清除当前图层所有的矢量要素。
-
removeFeatures(features)
leaflet/mapping/MovingTargetLayer.js, line 2135 -
从当前图层中删除feature。这个函数擦除所有传递进来的矢量要素。
Name Type Description featuresArray.<PlottingObject> 要删除feature的数组
-
removeSpecialEffect(uuid)
leaflet/mapping/MovingTargetLayer.js, line 559 -
移除指定特效。
Name Type Description uuidstring 特效唯一标识符
-
setClusterInfoVisible(visible)
leaflet/mapping/MovingTargetLayer.js, line 1390 -
开启图层聚合后,设置聚合信息是否显示。
Name Type Description visibleboolean 是否显示
-
setClusterRangeVisible(visible)
leaflet/mapping/MovingTargetLayer.js, line 1373 -
开启图层聚合后,设置聚合范围是否显示。
Name Type Description visibleboolean 是否显示
-
setClusterStyle(style)
leaflet/mapping/MovingTargetLayer.js, line 1408 -
开启图层聚合后,设置聚合范围与信息样式。
Name Type Description styleobject 样式风格
Name Type Description rangeColorstring 可选 聚合范围颜色
fontBackgroundColorstring 可选 聚合信息背景色
fontBackgroundBorderColorstring 可选 聚合信息背景边框色
-
setEditable(isEditable)
leaflet/mapping/MovingTargetLayer.js, line 623 -
设置图层的可编辑。
Name Type Description isEditableboolean 图层是否可编辑。
-
setGraphicZIndex(zIndex)
leaflet/mapping/MovingTargetLayer.js, line 1734 -
设置栅格对象renderer的z-index。
Name Type Description zIndexnumber 栅格对象renderer的z-index。
-
setLocked(isLocked)
leaflet/mapping/MovingTargetLayer.js, line 649 -
设置图层的可锁定。
Name Type Description isLockedboolean 图层的锁定。
-
setSelected(isSelected)
leaflet/mapping/MovingTargetLayer.js, line 592 -
设置图层的可选择。
Name Type Description isSelectedboolean 图层是否可选择。
-
setSymbolCluster(isCluster)
leaflet/mapping/MovingTargetLayer.js, line 1011 -
设置图层标号是否随缩放聚合
Name Type Description isClusterboolean 是否聚合。
-
setUnitSize(unitSize)
leaflet/mapping/MovingTargetLayer.js, line 1122 -
设置图层标号聚合的块单位
Name Type Description unitSizeobject 聚合策略的分块大小
Name Type Description widthnumber 可选 块宽度-经纬度为单位
heightnumber 可选 块高度-经纬度为单位
-
setVectorZIndex(zIndex)
leaflet/mapping/MovingTargetLayer.js, line 1746 -
设置矢量对象renderer的z-index。
Name Type Description zIndexnumber 矢量对象renderer的z-index。
-
setVisibility(visibility)
leaflet/mapping/MovingTargetLayer.js, line 675 -
设置图层可见性,设置图层的隐藏、显示、重绘的相应可见标记。
Name Type Description visibilityboolean 是否显示图层(当前地图的resolution在最大最小resolution之间)。
-
unClusterSymbol(symbolGroup)
leaflet/mapping/MovingTargetLayer.js, line 855 -
解绑标号聚合对象
Name Type Description symbolGrouparray 聚合标号
-
update()
leaflet/mapping/MovingTargetLayer.js, line 2550 -
不更新数据重绘图层的所有栅格对象。
-
updateFeatures(features)
leaflet/mapping/MovingTargetLayer.js, line 2519 -
更新指定栅格对象并重绘,矢量对象可以直接使用feature.redraw()重绘就可以
Name Type Description featuresObject 动目标对象。