hn-map 1.1.14 → 1.1.16
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/dist/index.js +1 -5863
- package/package.json +1 -1
- package/src/base/gaode_entity.ts +52 -30
- package/src/base/mars3d_entity.ts +50 -15
- package/src/base/siji_entity.ts +81 -44
- package/src/graphic/circle.ts +6 -6
- package/src/graphic/divPoint.ts +5 -5
- package/src/graphic/imagePoint.ts +6 -6
- package/src/graphic/label.ts +6 -6
- package/src/graphic/line.ts +6 -6
- package/src/graphic/numPoint.ts +6 -6
- package/src/graphic/point.ts +12 -7
- package/src/graphic/polygon.ts +7 -7
- package/src/graphic/rectangle.ts +6 -6
- package/src/index.ts +184 -86
- package/src/layer/cluster.ts +503 -243
- package/src/layer/heatMap.ts +0 -3
- package/src/layer/layer.ts +205 -3
- package/src/layer/pointCloud.ts +4 -3
- package/src/map.ts +418 -18
- package/src/other/route.ts +2 -2
- package/src/util.ts +258 -54
package/package.json
CHANGED
package/src/base/gaode_entity.ts
CHANGED
|
@@ -1,61 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 高德地图实体基类
|
|
3
|
+
* 提供高德地图要素的通用功能,如弹窗管理、飞行定位、要素销毁等
|
|
4
|
+
*/
|
|
5
|
+
export default class GaodeEntity {
|
|
6
|
+
/** 信息窗口实例 */
|
|
7
|
+
private infoWindow: any = null;
|
|
8
|
+
/** 地图实例 */
|
|
9
|
+
protected hnMap: any = null;
|
|
10
|
+
/** 配置对象 */
|
|
11
|
+
protected config: any = null;
|
|
12
|
+
/** 图形实例 */
|
|
13
|
+
protected graphic: any = null;
|
|
6
14
|
|
|
15
|
+
/**
|
|
16
|
+
* 构造函数
|
|
17
|
+
* @param hnMap 地图实例
|
|
18
|
+
*/
|
|
7
19
|
constructor(hnMap: any) {
|
|
8
|
-
this.hnMap = hnMap
|
|
20
|
+
this.hnMap = hnMap;
|
|
9
21
|
}
|
|
10
22
|
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
/**
|
|
24
|
+
* 添加属性弹窗
|
|
25
|
+
* 点击要素时显示包含要素属性信息的弹窗
|
|
26
|
+
*/
|
|
27
|
+
addPopupByAttr(): void {
|
|
13
28
|
this.infoWindow = new AMap.InfoWindow({offset: new AMap.Pixel(0, -30)});
|
|
14
29
|
|
|
15
30
|
const handleClick = (e: any) => {
|
|
16
|
-
const data = this.config.extData.data
|
|
17
|
-
let content = ''
|
|
31
|
+
const data = this.config.extData.data;
|
|
32
|
+
let content = '';
|
|
18
33
|
for (const key in data) {
|
|
19
|
-
content += `<div>${key}: ${data[key]}</div
|
|
34
|
+
content += `<div>${key}: ${data[key]}</div>`;
|
|
20
35
|
}
|
|
21
36
|
this.infoWindow.setContent(content);
|
|
22
37
|
this.infoWindow.open(this.hnMap.map.map, e.lnglat);
|
|
23
|
-
}
|
|
38
|
+
};
|
|
24
39
|
|
|
25
|
-
this.graphic.on('click', handleClick)
|
|
40
|
+
this.graphic.on('click', handleClick);
|
|
26
41
|
}
|
|
27
42
|
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
/**
|
|
44
|
+
* 添加自定义DOM弹窗
|
|
45
|
+
* 点击要素时显示自定义DOM结构的弹窗
|
|
46
|
+
* @param getCustomDom 自定义DOM生成函数,接收要素数据,返回DOM字符串
|
|
47
|
+
*/
|
|
48
|
+
addCustomPopup(getCustomDom: (data: any) => string): void {
|
|
30
49
|
this.infoWindow = new AMap.InfoWindow({offset: new AMap.Pixel(0, -30)});
|
|
31
50
|
|
|
32
|
-
const handleClick = (e:any
|
|
33
|
-
const data = this.config.extData.data
|
|
34
|
-
const dom = getCustomDom(data)
|
|
51
|
+
const handleClick = (e: any) => {
|
|
52
|
+
const data = this.config.extData.data;
|
|
53
|
+
const dom = getCustomDom(data);
|
|
35
54
|
this.infoWindow.setContent(dom);
|
|
36
55
|
this.infoWindow.open(this.hnMap.map.map, e.lnglat);
|
|
37
|
-
}
|
|
56
|
+
};
|
|
38
57
|
|
|
39
|
-
this.graphic.on('click', handleClick)
|
|
58
|
+
this.graphic.on('click', handleClick);
|
|
40
59
|
}
|
|
41
60
|
|
|
42
|
-
|
|
43
|
-
|
|
61
|
+
/**
|
|
62
|
+
* 飞行定位到要素
|
|
63
|
+
* 根据要素类型自动选择合适的定位方式
|
|
64
|
+
*/
|
|
65
|
+
flyTo(): void {
|
|
44
66
|
if (this.graphic.getCenter) {
|
|
45
67
|
this.hnMap.map.map.setCenter(this.graphic.getCenter());
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (this.graphic.getPosition) {
|
|
68
|
+
} else if (this.graphic.getPosition) {
|
|
49
69
|
this.hnMap.map.map.setCenter(this.graphic.getPosition());
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (this.graphic.getBounds) {
|
|
70
|
+
} else if (this.graphic.getBounds) {
|
|
53
71
|
const bounds = this.graphic.getBounds();
|
|
54
72
|
this.hnMap.map.map.setBounds(bounds);
|
|
55
73
|
}
|
|
56
74
|
}
|
|
57
75
|
|
|
58
|
-
|
|
59
|
-
|
|
76
|
+
/**
|
|
77
|
+
* 销毁要素
|
|
78
|
+
* 从地图中移除要素
|
|
79
|
+
*/
|
|
80
|
+
destroy(): void {
|
|
81
|
+
this.graphic.remove();
|
|
60
82
|
}
|
|
61
83
|
}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* mars3d地图实体基类
|
|
3
|
+
* 提供mars3d地图要素的通用功能,如弹窗管理、事件处理、飞行定位等
|
|
4
|
+
*/
|
|
5
|
+
export default class Mars3dEntity {
|
|
6
|
+
/** 配置选项 */
|
|
7
|
+
protected option: any = null;
|
|
8
|
+
/** 事件监听器集合 */
|
|
9
|
+
private event: Record<string, Function> = {};
|
|
10
|
+
/** 图形实例 */
|
|
11
|
+
protected graphic: any = null;
|
|
7
12
|
|
|
13
|
+
/**
|
|
14
|
+
* 构造函数
|
|
15
|
+
* @param hnMap 地图实例
|
|
16
|
+
*/
|
|
8
17
|
constructor(hnMap: any) {
|
|
9
18
|
this.event = {};
|
|
10
19
|
}
|
|
11
20
|
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
/**
|
|
22
|
+
* 添加属性弹窗
|
|
23
|
+
* 点击要素时显示包含要素属性信息的弹窗
|
|
24
|
+
*/
|
|
25
|
+
addPopupByAttr(): void {
|
|
14
26
|
this.graphic.bindPopup((event: any) => {
|
|
15
27
|
const data = event.graphic.attr;
|
|
16
28
|
return mars3d.Util.getTemplateHtml({
|
|
@@ -21,8 +33,12 @@ export default class mars3d_entity {
|
|
|
21
33
|
});
|
|
22
34
|
}
|
|
23
35
|
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 添加自定义DOM弹窗
|
|
38
|
+
* 点击要素时显示自定义DOM结构的弹窗
|
|
39
|
+
* @param getCustomDom 自定义DOM生成函数,接收要素数据,返回DOM字符串
|
|
40
|
+
*/
|
|
41
|
+
addCustomPopup(getCustomDom: (data: any) => Promise<string> | string): void {
|
|
26
42
|
this.graphic.bindPopup(
|
|
27
43
|
async (event: any) => {
|
|
28
44
|
if (event.graphic.attr) {
|
|
@@ -34,16 +50,30 @@ export default class mars3d_entity {
|
|
|
34
50
|
);
|
|
35
51
|
}
|
|
36
52
|
|
|
37
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 飞行定位到要素
|
|
55
|
+
* @param option 飞行定位选项
|
|
56
|
+
*/
|
|
57
|
+
flyTo(option: any = {}): void {
|
|
38
58
|
this.graphic.flyTo(option);
|
|
39
59
|
}
|
|
40
60
|
|
|
41
|
-
|
|
61
|
+
/**
|
|
62
|
+
* 销毁要素
|
|
63
|
+
* 从地图中移除并销毁要素
|
|
64
|
+
*/
|
|
65
|
+
destroy(): void {
|
|
42
66
|
this.graphic.destroy();
|
|
43
67
|
}
|
|
44
68
|
|
|
45
|
-
|
|
69
|
+
/**
|
|
70
|
+
* 监听事件
|
|
71
|
+
* @param eventType 事件类型
|
|
72
|
+
* @param callback 事件回调函数
|
|
73
|
+
*/
|
|
74
|
+
on(eventType: string, callback: (data: any) => void): void {
|
|
46
75
|
this.off(eventType);
|
|
76
|
+
|
|
47
77
|
switch (eventType) {
|
|
48
78
|
case "click":
|
|
49
79
|
this.event[eventType] = () => {
|
|
@@ -51,10 +81,15 @@ export default class mars3d_entity {
|
|
|
51
81
|
};
|
|
52
82
|
break;
|
|
53
83
|
}
|
|
84
|
+
|
|
54
85
|
this.graphic.on(eventType, this.event[eventType]);
|
|
55
|
-
}
|
|
86
|
+
}
|
|
56
87
|
|
|
57
|
-
|
|
88
|
+
/**
|
|
89
|
+
* 移除事件监听
|
|
90
|
+
* @param eventType 事件类型
|
|
91
|
+
*/
|
|
92
|
+
off(eventType: string): void {
|
|
58
93
|
if (this.event[eventType]) {
|
|
59
94
|
this.graphic.off(eventType, this.event[eventType]);
|
|
60
95
|
delete this.event[eventType];
|
package/src/base/siji_entity.ts
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
1
|
import {deepMerge} from "../util";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 思极地图实体基类
|
|
5
|
+
* 提供思极地图要素的通用功能,如弹窗管理、事件处理、飞行定位等
|
|
6
|
+
*/
|
|
7
|
+
export default class SijiEntity {
|
|
8
|
+
/** 事件监听器集合 */
|
|
9
|
+
private event: Record<string, Function> = {};
|
|
10
|
+
/** 信息窗口实例 */
|
|
11
|
+
private infoWindow: any = null;
|
|
12
|
+
/** 地图实例 */
|
|
13
|
+
protected hnMap: any = null;
|
|
14
|
+
/** 配置对象 */
|
|
15
|
+
protected config: any = null;
|
|
16
|
+
/** 图形实例 */
|
|
17
|
+
protected graphic: any = null;
|
|
18
|
+
/** 配置选项 */
|
|
19
|
+
protected option: any = null;
|
|
20
|
+
/** 要素类型 */
|
|
21
|
+
protected type: string | null = null;
|
|
22
|
+
/** 是否显示 */
|
|
23
|
+
protected show: boolean = false;
|
|
24
|
+
/** 要素ID */
|
|
25
|
+
protected id: string | null = null;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 构造函数
|
|
29
|
+
* @param hnMap 地图实例
|
|
30
|
+
*/
|
|
14
31
|
constructor(hnMap: any) {
|
|
15
32
|
this.hnMap = hnMap;
|
|
16
33
|
this.event = {};
|
|
17
34
|
this.show = false;
|
|
18
35
|
}
|
|
19
36
|
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
/**
|
|
38
|
+
* 添加属性弹窗
|
|
39
|
+
* 点击要素时显示包含要素属性信息的弹窗
|
|
40
|
+
*/
|
|
41
|
+
addPopupByAttr(): void {
|
|
22
42
|
// 如果已有弹窗,先关闭
|
|
23
43
|
this.removePopup();
|
|
24
44
|
|
|
@@ -28,12 +48,10 @@ export default class siji_entity {
|
|
|
28
48
|
});
|
|
29
49
|
|
|
30
50
|
const handleClick = (e: any) => {
|
|
31
|
-
|
|
32
51
|
const features = this.hnMap.map.map.queryRenderedFeatures(e.point);
|
|
33
52
|
if (features.length > 0) {
|
|
34
|
-
//
|
|
53
|
+
// 当前点击的第一层图形为当前图形时,才触发点击事件
|
|
35
54
|
if (features[0].layer.id === this.id) {
|
|
36
|
-
// const data = e.features[0].properties;
|
|
37
55
|
const data = this.option.data;
|
|
38
56
|
// 创建弹窗内容
|
|
39
57
|
let content = "";
|
|
@@ -44,15 +62,18 @@ export default class siji_entity {
|
|
|
44
62
|
this.infoWindow.setHTML(content);
|
|
45
63
|
this.infoWindow.setLngLat(e.lngLat).addTo(this.hnMap.map.map);
|
|
46
64
|
}
|
|
47
|
-
|
|
48
65
|
}
|
|
49
66
|
};
|
|
50
67
|
|
|
51
68
|
this.hnMap.map.map.on("click", this.id, handleClick);
|
|
52
69
|
}
|
|
53
70
|
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
/**
|
|
72
|
+
* 添加自定义DOM弹窗
|
|
73
|
+
* 点击要素时显示自定义DOM结构的弹窗
|
|
74
|
+
* @param getCustomDom 自定义DOM生成函数,接收要素数据,返回DOM字符串
|
|
75
|
+
*/
|
|
76
|
+
addCustomPopup(getCustomDom: (data: any) => string): void {
|
|
56
77
|
this.removePopup();
|
|
57
78
|
this.infoWindow = new SGMap.Popup({
|
|
58
79
|
offset: {bottom: [0, 0]},
|
|
@@ -62,10 +83,9 @@ export default class siji_entity {
|
|
|
62
83
|
const handleClick = (e: any) => {
|
|
63
84
|
const features = this.hnMap.map.map.queryRenderedFeatures(e.point);
|
|
64
85
|
if (features.length > 0) {
|
|
65
|
-
//
|
|
86
|
+
// 当前点击的第一层图形为当前图形时,才触发点击事件
|
|
66
87
|
if (features[0].layer.id === this.id) {
|
|
67
88
|
const data = this.option.data;
|
|
68
|
-
// const data = e.features[0].properties;
|
|
69
89
|
const dom = getCustomDom(data);
|
|
70
90
|
this.infoWindow.setHTML(dom);
|
|
71
91
|
this.infoWindow.setLngLat(e.lngLat).addTo(this.hnMap.map.map);
|
|
@@ -76,58 +96,70 @@ export default class siji_entity {
|
|
|
76
96
|
this.hnMap.map.map.on("click", this.id, handleClick);
|
|
77
97
|
}
|
|
78
98
|
|
|
79
|
-
|
|
80
|
-
|
|
99
|
+
/**
|
|
100
|
+
* 删除弹窗
|
|
101
|
+
*/
|
|
102
|
+
removePopup(): void {
|
|
81
103
|
if (this.infoWindow) {
|
|
82
104
|
this.infoWindow.remove();
|
|
83
105
|
}
|
|
84
106
|
}
|
|
85
107
|
|
|
86
|
-
|
|
108
|
+
/**
|
|
109
|
+
* 飞行定位到要素
|
|
110
|
+
* @param option 飞行定位选项
|
|
111
|
+
*/
|
|
112
|
+
flyTo(option: any = {}): void {
|
|
87
113
|
deepMerge(this.option, option);
|
|
88
|
-
|
|
89
|
-
let center;
|
|
114
|
+
const zoom = this.hnMap.map.map.getZoom();
|
|
115
|
+
let center: [number, number];
|
|
116
|
+
|
|
90
117
|
if (this.option.center) {
|
|
91
118
|
center = this.option.center;
|
|
92
119
|
} else {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.type == "flicker" ||
|
|
97
|
-
this.type == "flow" ||
|
|
98
|
-
this.type == "arrow" ||
|
|
99
|
-
this.type == "mapLabel" ||
|
|
100
|
-
this.type == "rectangle"
|
|
101
|
-
) {
|
|
120
|
+
const type = this.type || "";
|
|
121
|
+
// 根据要素类型确定中心点
|
|
122
|
+
if (["line", "dash", "flicker", "flow", "arrow", "mapLabel", "rectangle"].includes(type)) {
|
|
102
123
|
center = this.option.position[0];
|
|
103
|
-
} else if (
|
|
124
|
+
} else if (type === "route") {
|
|
104
125
|
center = [this.option.position[0][0], this.option.position[0][1]];
|
|
105
|
-
} else if (
|
|
126
|
+
} else if (type === "polygon") {
|
|
106
127
|
center = this.option.position[0][0];
|
|
107
128
|
} else {
|
|
108
129
|
center = this.option.position;
|
|
109
130
|
}
|
|
110
131
|
}
|
|
132
|
+
|
|
111
133
|
this.hnMap.map.map.flyTo({
|
|
112
|
-
duration: 1000, //
|
|
134
|
+
duration: 1000, // 持续时间(毫秒)
|
|
113
135
|
zoom: this.option.zoom || zoom,
|
|
114
136
|
center: center,
|
|
115
137
|
});
|
|
116
138
|
}
|
|
117
139
|
|
|
118
|
-
|
|
140
|
+
/**
|
|
141
|
+
* 销毁要素
|
|
142
|
+
* 从地图中移除图层和数据源
|
|
143
|
+
*/
|
|
144
|
+
destroy(): void {
|
|
119
145
|
this.hnMap.map.map.removeLayer(this.config.id);
|
|
120
146
|
this.hnMap.map.map.removeSource(this.config.id);
|
|
121
147
|
}
|
|
122
148
|
|
|
123
|
-
|
|
149
|
+
/**
|
|
150
|
+
* 监听事件
|
|
151
|
+
* @param eventType 事件类型
|
|
152
|
+
* @param callback 事件回调函数
|
|
153
|
+
*/
|
|
154
|
+
on(eventType: string, callback: (data: any) => void): void {
|
|
124
155
|
this.off(eventType);
|
|
156
|
+
|
|
125
157
|
switch (eventType) {
|
|
126
158
|
case "click":
|
|
127
|
-
this.event[eventType] = (e:any) => {
|
|
159
|
+
this.event[eventType] = (e: any) => {
|
|
128
160
|
const features = this.hnMap.map.map.queryRenderedFeatures(e.point);
|
|
129
161
|
if (features.length > 0) {
|
|
130
|
-
//
|
|
162
|
+
// 当前点击的第一层图形为当前图形时,才触发回调
|
|
131
163
|
if (features[0].layer.id === this.id) {
|
|
132
164
|
callback(this.option.data);
|
|
133
165
|
}
|
|
@@ -135,10 +167,15 @@ export default class siji_entity {
|
|
|
135
167
|
};
|
|
136
168
|
break;
|
|
137
169
|
}
|
|
170
|
+
|
|
138
171
|
this.hnMap.map.map.on(eventType, this.id, this.event[eventType]);
|
|
139
|
-
}
|
|
172
|
+
}
|
|
140
173
|
|
|
141
|
-
|
|
174
|
+
/**
|
|
175
|
+
* 移除事件监听
|
|
176
|
+
* @param eventType 事件类型
|
|
177
|
+
*/
|
|
178
|
+
off(eventType: string): void {
|
|
142
179
|
if (this.event[eventType]) {
|
|
143
180
|
this.hnMap.map.map.off(eventType, this.id, this.event[eventType]);
|
|
144
181
|
delete this.event[eventType];
|
package/src/graphic/circle.ts
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
wgs84ToGcj02Format,
|
|
5
5
|
convertPosition,
|
|
6
6
|
} from "../util";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import Mars3dEntity from "../base/mars3d_entity";
|
|
8
|
+
import GaodeEntity from "../base/gaode_entity";
|
|
9
|
+
import SijiEntity from "../base/siji_entity";
|
|
10
10
|
|
|
11
11
|
export default (hnMap: any) => {
|
|
12
12
|
const defaultOption = {
|
|
@@ -31,7 +31,7 @@ export default (hnMap: any) => {
|
|
|
31
31
|
data: null,
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
class mars3d_class extends
|
|
34
|
+
class mars3d_class extends Mars3dEntity {
|
|
35
35
|
type: any = "circle";
|
|
36
36
|
id: any = null;
|
|
37
37
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -120,7 +120,7 @@ export default (hnMap: any) => {
|
|
|
120
120
|
// }
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
class gaode_class extends
|
|
123
|
+
class gaode_class extends GaodeEntity {
|
|
124
124
|
id: any = null;
|
|
125
125
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
126
126
|
config: any = null;
|
|
@@ -158,7 +158,7 @@ export default (hnMap: any) => {
|
|
|
158
158
|
this.graphic.setCenter(this.config.center);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
class siji_class extends
|
|
161
|
+
class siji_class extends SijiEntity {
|
|
162
162
|
type: any = "circle";
|
|
163
163
|
id: any = null;
|
|
164
164
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
package/src/graphic/divPoint.ts
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
wgs84ToGcj02Format,
|
|
5
5
|
convertPosition,
|
|
6
6
|
} from "../util";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import Mars3dEntity from "../base/mars3d_entity";
|
|
8
|
+
import GaodeEntity from "../base/gaode_entity";
|
|
9
|
+
import SijiEntity from "../base/siji_entity";
|
|
10
10
|
const HorizontalOrigin: any = {
|
|
11
11
|
center: 0,
|
|
12
12
|
left: 1,
|
|
@@ -34,7 +34,7 @@ export default (hnMap: any) => {
|
|
|
34
34
|
data: null,
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
class mars3d_class extends
|
|
37
|
+
class mars3d_class extends Mars3dEntity {
|
|
38
38
|
type: any = "divPoint";
|
|
39
39
|
id: any = null;
|
|
40
40
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -85,7 +85,7 @@ export default (hnMap: any) => {
|
|
|
85
85
|
this.graphic.openPopup();
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
class siji_class extends
|
|
88
|
+
class siji_class extends SijiEntity {
|
|
89
89
|
type: any = "divPoint";
|
|
90
90
|
id: any = null;
|
|
91
91
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
wgs84ToGcj02Format,
|
|
5
5
|
convertPosition,
|
|
6
6
|
} from "../util";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import Mars3dEntity from "../base/mars3d_entity";
|
|
8
|
+
import GaodeEntity from "../base/gaode_entity";
|
|
9
|
+
import SijiEntity from "../base/siji_entity";
|
|
10
10
|
|
|
11
11
|
const HorizontalOrigin: any = {
|
|
12
12
|
center: 0,
|
|
@@ -41,7 +41,7 @@ export default (hnMap: any) => {
|
|
|
41
41
|
data: null,
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
class mars3d_class extends
|
|
44
|
+
class mars3d_class extends Mars3dEntity {
|
|
45
45
|
id: any = null;
|
|
46
46
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
47
47
|
config: any = null;
|
|
@@ -114,7 +114,7 @@ export default (hnMap: any) => {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
class gaode_class extends
|
|
117
|
+
class gaode_class extends GaodeEntity {
|
|
118
118
|
type: any = "imagePoint";
|
|
119
119
|
id: any = null;
|
|
120
120
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -154,7 +154,7 @@ export default (hnMap: any) => {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
class siji_class extends
|
|
157
|
+
class siji_class extends SijiEntity {
|
|
158
158
|
type: any = "imagePoint";
|
|
159
159
|
id: any = null;
|
|
160
160
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
package/src/graphic/label.ts
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
wgs84ToGcj02Format,
|
|
5
5
|
convertPosition,
|
|
6
6
|
} from "../util";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import Mars3dEntity from "../base/mars3d_entity";
|
|
8
|
+
import GaodeEntity from "../base/gaode_entity";
|
|
9
|
+
import SijiEntity from "../base/siji_entity";
|
|
10
10
|
|
|
11
11
|
export default (hnMap: any) => {
|
|
12
12
|
const defaultOption = {
|
|
@@ -33,7 +33,7 @@ export default (hnMap: any) => {
|
|
|
33
33
|
data: null,
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
class mars3d_class extends
|
|
36
|
+
class mars3d_class extends Mars3dEntity {
|
|
37
37
|
type: any = "label";
|
|
38
38
|
id: any = null;
|
|
39
39
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -133,7 +133,7 @@ export default (hnMap: any) => {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
class gaode_class extends
|
|
136
|
+
class gaode_class extends GaodeEntity {
|
|
137
137
|
id: any = null;
|
|
138
138
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
139
139
|
config: any = null;
|
|
@@ -179,7 +179,7 @@ export default (hnMap: any) => {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
class siji_class extends
|
|
182
|
+
class siji_class extends SijiEntity {
|
|
183
183
|
type: any = "label";
|
|
184
184
|
id: any = null;
|
|
185
185
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
package/src/graphic/line.ts
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
wgs84ToGcj02Format,
|
|
5
5
|
convertPosition,
|
|
6
6
|
} from "../util";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import Mars3dEntity from "../base/mars3d_entity";
|
|
8
|
+
import GaodeEntity from "../base/gaode_entity";
|
|
9
|
+
import SijiEntity from "../base/siji_entity";
|
|
10
10
|
|
|
11
11
|
export default (hnMap: any) => {
|
|
12
12
|
const defaultOption = {
|
|
@@ -33,7 +33,7 @@ export default (hnMap: any) => {
|
|
|
33
33
|
instances: [],
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
class mars3d_class extends
|
|
36
|
+
class mars3d_class extends Mars3dEntity {
|
|
37
37
|
type: any = "line";
|
|
38
38
|
id: any = null;
|
|
39
39
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -162,7 +162,7 @@ export default (hnMap: any) => {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
class gaode_class extends
|
|
165
|
+
class gaode_class extends GaodeEntity {
|
|
166
166
|
id: any = null;
|
|
167
167
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
168
168
|
config: any = null;
|
|
@@ -199,7 +199,7 @@ export default (hnMap: any) => {
|
|
|
199
199
|
this.graphic.setPath(this.config.path);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
class siji_class extends
|
|
202
|
+
class siji_class extends SijiEntity {
|
|
203
203
|
type: any = "line";
|
|
204
204
|
id: any = null;
|
|
205
205
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
package/src/graphic/numPoint.ts
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
wgs84ToGcj02Format,
|
|
5
5
|
convertPosition,
|
|
6
6
|
} from "../util";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import Mars3dEntity from "../base/mars3d_entity";
|
|
8
|
+
import GaodeEntity from "../base/gaode_entity";
|
|
9
|
+
import SijiEntity from "../base/siji_entity";
|
|
10
10
|
export default (hnMap: any) => {
|
|
11
11
|
const defaultOption = {
|
|
12
12
|
id: "",
|
|
@@ -24,7 +24,7 @@ export default (hnMap: any) => {
|
|
|
24
24
|
data: null,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
class mars3d_class extends
|
|
27
|
+
class mars3d_class extends Mars3dEntity {
|
|
28
28
|
type: any = "numPoint";
|
|
29
29
|
id: any = null;
|
|
30
30
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
@@ -74,7 +74,7 @@ export default (hnMap: any) => {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
class gaode_class extends
|
|
77
|
+
class gaode_class extends GaodeEntity {
|
|
78
78
|
id: any = null;
|
|
79
79
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|
|
80
80
|
config: any = null;
|
|
@@ -120,7 +120,7 @@ export default (hnMap: any) => {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
class siji_class extends
|
|
123
|
+
class siji_class extends SijiEntity {
|
|
124
124
|
type: any = "numPoint";
|
|
125
125
|
id: any = null;
|
|
126
126
|
option: any = JSON.parse(JSON.stringify(defaultOption));
|