my-openlayer 1.0.14 → 2.0.0

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.
package/core/Point.d.ts CHANGED
@@ -1,94 +1,94 @@
1
- import Map from "ol/Map";
2
- import VectorLayer from "ol/layer/Vector";
3
- import VectorSource from "ol/source/Vector";
4
- import { MapJSONData, PointOptions, ClusterOptions, PointData, VueTemplatePointInstance } from '../types';
5
- export default class Point {
6
- private map;
7
- constructor(map: Map);
8
- /**
9
- * 创建文本样式
10
- * @private
11
- * @param options 选项
12
- * @param text 文本内容
13
- * @returns 文本样式
14
- */
15
- private createTextStyle;
16
- /**
17
- * 创建图标样式
18
- * @private
19
- * @param options 选项
20
- * @returns 图标样式
21
- */
22
- private createIconStyle;
23
- /**
24
- * 创建点样式
25
- * @private
26
- * @param options 选项
27
- * @param item 数据项
28
- * @returns 样式对象
29
- */
30
- private createPointStyle;
31
- /**
32
- * 创建集群样式
33
- * @private
34
- * @param options 选项
35
- * @param name 名称
36
- * @returns 样式对象
37
- */
38
- private createClusterStyle;
39
- /**
40
- * 配置图层属性
41
- * @private
42
- * @param layer 图层
43
- * @param options 选项
44
- */
45
- private configureLayer;
46
- /**
47
- *
48
- * @param pointData
49
- * @param type
50
- * @param options {
51
- * textKey: String 数据中的文本的key
52
- * img: String 图标
53
- * }
54
- */
55
- addPoint(pointData: PointData[], options: PointOptions): VectorLayer<VectorSource> | null;
56
- addClusterPoint(pointData: PointData[], options: ClusterOptions): VectorLayer<VectorSource> | null;
57
- addTwinkleLayerFromPolygon(twinkleList: any[], className: string, key: string, json: MapJSONData): void;
58
- /**
59
- * 添加闪烁点
60
- * @param twinkleList 闪烁点数据 - 二维数组 [[],[]]
61
- * @param className 闪烁点样式,需要和id保持一致
62
- * @param key 闪烁点索引
63
- * @param callback
64
- */
65
- addTwinkleLayer(twinkleList: any[], className: string | undefined, key: string, callback?: Function): void;
66
- /**
67
- * 地图定位
68
- * @param lgtd 经度
69
- * @param lttd 纬度
70
- * @param zoom 缩放级别
71
- * @param duration 动画时长
72
- */
73
- locationAction(lgtd: number, lttd: number, zoom?: number, duration?: number): boolean;
74
- /**
75
- * 设置dom元素为点位
76
- */
77
- addDomPoint(id: string, lgtd: number, lttd: number): boolean;
78
- /**
79
- * 添加vue组件为点位
80
- * @param pointDataList 点位信息列表
81
- * @param template vue组件模板
82
- * @param Vue Vue实例
83
- * @returns 返回控制对象,包含显示、隐藏、移除方法
84
- * @throws 当参数无效时抛出错误
85
- */
86
- addVueTemplatePoint(pointDataList: PointData[], template: any, options?: {
87
- positioning?: 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right';
88
- stopEvent?: boolean;
89
- }): {
90
- setVisible: (visible: boolean) => void;
91
- remove: () => void;
92
- getPoints: () => VueTemplatePointInstance[];
93
- };
94
- }
1
+ import Map from "ol/Map";
2
+ import VectorLayer from "ol/layer/Vector";
3
+ import VectorSource from "ol/source/Vector";
4
+ import { MapJSONData, PointOptions, ClusterOptions, PointData, VueTemplatePointInstance } from '../types';
5
+ export default class Point {
6
+ private map;
7
+ constructor(map: Map);
8
+ /**
9
+ * 创建文本样式
10
+ * @private
11
+ * @param options 选项
12
+ * @param text 文本内容
13
+ * @returns 文本样式
14
+ */
15
+ private createTextStyle;
16
+ /**
17
+ * 创建图标样式
18
+ * @private
19
+ * @param options 选项
20
+ * @returns 图标样式
21
+ */
22
+ private createIconStyle;
23
+ /**
24
+ * 创建点样式
25
+ * @private
26
+ * @param options 选项
27
+ * @param item 数据项
28
+ * @returns 样式对象
29
+ */
30
+ private createPointStyle;
31
+ /**
32
+ * 创建集群样式
33
+ * @private
34
+ * @param options 选项
35
+ * @param name 名称
36
+ * @returns 样式对象
37
+ */
38
+ private createClusterStyle;
39
+ /**
40
+ * 配置图层属性
41
+ * @private
42
+ * @param layer 图层
43
+ * @param options 选项
44
+ */
45
+ private configureLayer;
46
+ /**
47
+ *
48
+ * @param pointData
49
+ * @param type
50
+ * @param options {
51
+ * textKey: String 数据中的文本的key
52
+ * img: String 图标
53
+ * }
54
+ */
55
+ addPoint(pointData: PointData[], options: PointOptions): VectorLayer<VectorSource> | null;
56
+ addClusterPoint(pointData: PointData[], options: ClusterOptions): VectorLayer<VectorSource> | null;
57
+ addTwinkleLayerFromPolygon(twinkleList: any[], className: string, key: string, json: MapJSONData): void;
58
+ /**
59
+ * 添加闪烁点
60
+ * @param twinkleList 闪烁点数据 - 二维数组 [[],[]]
61
+ * @param className 闪烁点样式,需要和id保持一致
62
+ * @param key 闪烁点索引
63
+ * @param callback
64
+ */
65
+ addTwinkleLayer(twinkleList: any[], className: string | undefined, key: string, callback?: Function): void;
66
+ /**
67
+ * 地图定位
68
+ * @param lgtd 经度
69
+ * @param lttd 纬度
70
+ * @param zoom 缩放级别
71
+ * @param duration 动画时长
72
+ */
73
+ locationAction(lgtd: number, lttd: number, zoom?: number, duration?: number): boolean;
74
+ /**
75
+ * 设置dom元素为点位
76
+ */
77
+ addDomPoint(id: string, lgtd: number, lttd: number): boolean;
78
+ /**
79
+ * 添加vue组件为点位
80
+ * @param pointDataList 点位信息列表
81
+ * @param template vue组件模板
82
+ * @param Vue Vue实例
83
+ * @returns 返回控制对象,包含显示、隐藏、移除方法
84
+ * @throws 当参数无效时抛出错误
85
+ */
86
+ addVueTemplatePoint(pointDataList: PointData[], template: any, options?: {
87
+ positioning?: 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right';
88
+ stopEvent?: boolean;
89
+ }): {
90
+ setVisible: (visible: boolean) => void;
91
+ remove: () => void;
92
+ getPoints: () => VueTemplatePointInstance[];
93
+ };
94
+ }