Class: Trajectory

Trajectory

轨迹线对象。

new Trajectory(trajectoryLength, showTrackingLine, showTrackingPoint, style, options)

Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new SuperMap.Plot.Trajectory(trajectoryLength, showTrackingLine, showTrackingPoint, style, options);
  
  
</script>

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

new Trajectory(trajectoryLength, showTrackingLine, showTrackingPoint, style, options);

common/plot/Trajectory.js, line 5
Name Type Description
trajectoryLength number

轨迹线显示长度,默认显示15个,-1为全部显示。

showTrackingLine boolean

是否显示轨迹线。

showTrackingPoint boolean

是否显示轨迹点。

style style

轨迹线风格

options Object

轨迹线参数。

Name Type Description
saveTrackingPoint boolean 可选

是否存储所有轨迹点。

trackingPointStyle number 可选

轨迹点样式,0为实体圆、1为空心圆、2为实心三角、3为空心三角、4为十字。

trackingPointRadius number 可选

轨迹点半径大小。

Members

saveTrackingPointboolean

是否存储历史轨迹点,即不显示的轨迹点是否存储。默认为不存储。不建议存储,存储历史轨迹可能导致内存不够的情况。

showTrackingLineboolean

是否显示轨迹线。默认为显示

showTrackingPointboolean

是否显示轨迹点。默认为不显示

stylestyle

轨迹线风格。

trackingPointRadiusnumber

轨迹点样式大小。

trackingPointStylenumber

轨迹点样式,0为实体圆、1为空心圆、2为实心三角、3为空心三角、4为十字。

trajectoryLengthnumber

轨迹线长度,即轨迹线显示的点个数。默认为15个,如果该值设置为-1则全部显示

Methods

addLatLng()

common/plot/Trajectory.js, line 94

添加位置点。

clone(){Trajectory}

common/plot/Trajectory.js, line 190

克隆轨迹线对象。

Returns:
Type Description
Trajectory 克隆后的轨迹线对象。

destroy()

common/plot/Trajectory.js, line 177

销毁轨迹线对象数据。

getDisplayLatLngs()

common/plot/Trajectory.js, line 116

获取可显示位置点。

parseSymbolData(){Trajectory}

common/plot/Trajectory.js, line 225

解析轨迹线数据。

Returns:
Type Description
Trajectory 解析轨迹线数据。

setSymbolData(){Trajectory}

common/plot/Trajectory.js, line 208

设置轨迹线数据。

Returns:
Type Description
Trajectory 设置轨迹线数据。