mirage2d 1.1.60 → 1.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,19 @@
1
- import { Vector as VectorSource } from "ol/source";
2
- import { Vector as VectorLayer } from "ol/layer";
3
1
  import Feature from "ol/Feature";
4
- import { Geometry, LineString, Point } from "ol/geom";
5
- import Dijkstra from "ol-ext//geom/Dijkstra";
2
+ import { LineString, Point } from "ol/geom";
6
3
  import { Coordinate } from "ol/coordinate";
7
4
  import { IPathLayerOption } from "../../base/baseOptionType";
8
5
  import { baseLayer } from "../../base/baseLayer";
9
6
  export declare class PathLayer extends baseLayer {
10
- autoPointSize: boolean;
11
- result: VectorSource<Geometry>;
12
- resultlayer: VectorLayer<any>;
13
- resultSource: VectorSource<Geometry>;
14
- nodesLayer: VectorLayer<any>;
15
- dijkstra: Dijkstra;
16
- pathDatalayer: VectorLayer<any>;
17
- animating: boolean;
18
- distance: number;
19
- lastTime: any;
7
+ private autoPointSize;
8
+ private result;
9
+ private resultlayer;
10
+ private resultSource;
11
+ private nodesLayer;
12
+ private dijkstra;
13
+ private pathDatalayer;
14
+ private animating;
15
+ private distance;
16
+ private lastTime;
20
17
  private pathLine;
21
18
  private position;
22
19
  private geoMarker;
@@ -32,7 +29,7 @@ export declare class PathLayer extends baseLayer {
32
29
  private FeatureMoveProgressInfo;
33
30
  private oldPathLineFeature;
34
31
  option: IPathLayerOption;
35
- routeFeatures: Feature<Geometry>[];
32
+ private routeFeatures;
36
33
  private _source;
37
34
  private multiLinePathData;
38
35
  constructor(layerid: any, options: IPathLayerOption);
@@ -51,11 +48,45 @@ export declare class PathLayer extends baseLayer {
51
48
  private moveFeature3;
52
49
  private moveFeature2;
53
50
  private ComputDirection;
51
+ /**
52
+ * @description:根据坐标或点获取网络路径上的最近点
53
+ * @param {Feature<Point> | Coordinate} Coordinate
54
+ * @return {Feature<Point>} Point
55
+ */
54
56
  getNearestPointOnPathNetWork(Coordinate: Feature<Point> | Coordinate): Feature<Point>;
55
- setUserMarker(Coordinate: Feature<Point> | Coordinate, angle: number, addUserMarker?: boolean): void;
56
- setUserCoordinate(currentCoordinate: Feature<Point> | Coordinate): void;
57
+ /**
58
+ * @description:添加导航mark,仅能存在一个
59
+ * @param {Feature<Point> | Coordinate} Coordinate
60
+ * @param {number} angle 角度
61
+ * @param {boolean} addUserMarker 是否添加新的marker
62
+ * @return {Feature<Point>} Point
63
+ */
64
+ addNavigationMarker(): void;
65
+ /**
66
+ * @description:设置导航mark位置及角度
67
+ * @param {Feature<Point> | Coordinate} Coordinate
68
+ * @param {number} angle 角度
69
+ * @return {Feature<Point>} Point
70
+ */
71
+ setNavigationMarker(Coordinate: Feature<Point> | Coordinate, angle?: number): void;
72
+ /**
73
+ * @description:设置导航mark位置及角度
74
+ * @param {Feature<Point> | Coordinate} Coordinate
75
+ * @param {number} angle 角度
76
+ * @param {boolean} addUserMarker 是否添加新的marker
77
+ * @return {Feature<Point>} Point
78
+ */
79
+ private updateNavigationMarker;
80
+ /**
81
+ * @description:返回导航路径
82
+ */
57
83
  getPathLine(): LineString;
58
- computerPath(startCoordinate: any, endPointCoordinate: any): void;
84
+ /**
85
+ * @description:计算导航路径
86
+ * @param {Coordinate} startCoordinate startCoordinate
87
+ * @param {Coordinate} endPointCoordinate 标准GeoJson格式
88
+ */
89
+ computerPath(startCoordinate: Coordinate | Feature<Point>, endPointCoordinate: Coordinate | Feature<Point>): void;
59
90
  computerPath2(startCoordinate: any, endPointCoordinate: any): void;
60
91
  /**
61
92
  * @description: 添加GeoJSON数据,需要数据库样式匹配
@@ -85,8 +116,21 @@ export declare class PathLayer extends baseLayer {
85
116
  * @param {string} classname
86
117
  */
87
118
  removeFeatures(classname: string): void;
88
- removeNavigationFeatures(): void;
89
- removeMarker(): void;
119
+ /**删除导航路径数据
120
+ * @description:
121
+ */
122
+ removeNavigationPath(): void;
123
+ /**删除导航mark
124
+ * @description:
125
+ */
126
+ removeNavigationMarker(): void;
127
+ /**删除导航所有数据
128
+ * @description:
129
+ */
130
+ removeNavigationAll(): void;
131
+ /**导出路径数据
132
+ * @description:
133
+ */
90
134
  pathToGeoJSON(): import("geojson").FeatureCollection<import("geojson").Geometry, {
91
135
  [name: string]: any;
92
136
  }>;
@@ -12,6 +12,8 @@ export declare enum featureType {
12
12
  onFeaturePopupClose = "popupclose",
13
13
  onFeatureTooltipOpen = "tooltipopen",
14
14
  onFeatureTooltiClose = "toolticlose",
15
+ onFeatureMoved = "featureMoved",
16
+ onFeatureDeleted = "featureDeleted",
15
17
  onDrawStart = "onDrawStart",
16
18
  onDrawEnd = "onDrawEnd",
17
19
  onFeatureMoveProgress = "onFeatureMoveProgress",