@shjjs/visual-ui 1.0.39 → 1.0.40
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/es/commons/core/earth/main.vue.mjs +7 -7
- package/es/commons/core/useChart.mjs +301 -301
- package/es/commons/utils/parseDataset.mjs +19 -19
- package/es/commons/utils/typescript.d.ts +5 -5
- package/es/components/chart/commons/components/common-chart/index.vue.mjs +269 -269
- package/es/components/chart/commons/components/common-chart-map/index.vue.mjs +247 -247
- package/es/components/chart/commons/hooks/useChart.mjs +316 -316
- package/es/components/chart-other-candlestick-basic/index.vue.mjs +261 -261
- package/es/components/chart-other-candlestick-demo/index.vue.mjs +260 -260
- package/es/components/chart-other-candlestick-shanghai/index.vue.mjs +260 -260
- package/es/components/chart-other-circular-graph/index.vue.mjs +260 -260
- package/es/components/chart-other-force/index.vue.mjs +260 -260
- package/es/components/chart-other-force2/index.vue.mjs +260 -260
- package/es/components/chart-other-funnel/index.vue.mjs +260 -260
- package/es/components/chart-other-funnel-contrast/index.vue.mjs +260 -260
- package/es/components/chart-other-funnel-split/index.vue.mjs +260 -260
- package/es/components/chart-other-funnel2/index.vue.mjs +260 -260
- package/es/components/chart-other-gauge/index.vue.mjs +260 -260
- package/es/components/chart-other-gauge-grade/index.vue.mjs +260 -260
- package/es/components/chart-other-gauge-stage/index.vue.mjs +260 -260
- package/es/components/chart-other-graph-basic/index.vue.mjs +260 -260
- package/es/components/chart-other-graph-basic2/index.vue.mjs +260 -260
- package/es/components/chart-other-graph-calendar/index.vue.mjs +260 -260
- package/es/components/chart-other-grid-percentage/index.vue.mjs +266 -266
- package/es/components/chart-other-heatmap/index.vue.mjs +260 -260
- package/es/components/chart-other-label-gauge/index.vue.mjs +262 -262
- package/es/components/chart-other-liquidfill/index.vue.mjs +259 -259
- package/es/components/chart-other-parallel-basic/index.vue.mjs +260 -260
- package/es/components/chart-other-parallel-mul/index.vue.mjs +260 -260
- package/es/components/chart-other-radar/index.vue.mjs +281 -281
- package/es/components/chart-other-radar-stack/index.vue.mjs +261 -261
- package/es/components/chart-other-sunburst-basic/index.vue.mjs +260 -260
- package/es/components/chart-other-sunburst-basic2/index.vue.mjs +260 -260
- package/es/components/chart-other-sunburst-basic3/index.vue.mjs +260 -260
- package/es/components/chart-other-sunburst-basic4/index.vue.mjs +260 -260
- package/es/components/chart-other-sunburst-book/index.vue.mjs +260 -260
- package/es/components/chart-other-sunburst-flavors/index.vue.mjs +260 -260
- package/es/components/chart-other-sunburst-radius/index.vue.mjs +260 -260
- package/es/components/chart-other-theme-river/index.vue.mjs +265 -265
- package/es/components/chart-other-tree/index.vue.mjs +259 -259
- package/es/components/chart-other-tree-line/index.vue.mjs +259 -259
- package/es/components/chart-other-treemap/index.vue.mjs +259 -259
- package/es/components/chart-other-treemap-basic/index.vue.mjs +259 -259
- package/es/components/chart-other-word-cloud/index.vue.mjs +259 -259
- package/es/components/commons/custom-component-render/index.d.ts +76 -76
- package/es/components/commons/custom-component-render/index.vue.d.ts +76 -76
- package/es/components/commons/custom-component-render/index.vue.mjs +7 -7
- package/es/components/commons/custom-component-render/index.vue2.mjs +280 -280
- package/es/components/commons-echarts/compileAndRunEcharts.mjs +279 -279
- package/es/components/commons-gaussian-splatting-view/index.vue.mjs +7 -7
- package/es/components/commons-loop-iterator/index.vue.mjs +7 -7
- package/es/components/commons-loop-iterator/index.vue2.mjs +315 -315
- package/es/components/commons-product-model/index.vue.mjs +7 -7
- package/es/components/commons-product-model/index.vue2.mjs +424 -424
- package/es/components/commons-qrcode/index.vue.d.ts +90 -90
- package/es/components/commons-qrcode/index.vue.mjs +7 -7
- package/es/components/commons-three-loader/index.vue.mjs +7 -7
- package/es/components/commons-three-loader/index.vue2.mjs +410 -410
- package/es/components/commons-three-loader3/index.vue.mjs +7 -7
- package/es/components/commons-three-loader3/index.vue2.mjs +387 -387
- package/es/components/commons-weather/index.vue.mjs +7 -7
- package/es/components/commons-weather/index.vue2.mjs +297 -297
- package/es/components/commons-weather-dynamic/index.vue.mjs +7 -7
- package/es/components/commons-weather-dynamic/index.vue2.mjs +305 -305
- package/es/components/graphical-circle/index.vue.mjs +7 -7
- package/es/components/graphical-diamond/index.vue.mjs +7 -7
- package/es/components/graphical-hexagon/index.vue.mjs +7 -7
- package/es/components/graphical-isosceles-triangle/index.vue.mjs +7 -7
- package/es/components/graphical-pentagon/index.vue.mjs +7 -7
- package/es/components/graphical-rect/index.vue.mjs +7 -7
- package/es/components/graphical-right-triangle/index.vue.mjs +7 -7
- package/es/components/index.d.ts +113 -113
- package/es/components/index.mjs +364 -364
- package/es/components/interaction/button/index.vue.mjs +7 -7
- package/es/components/interaction/button/index.vue2.mjs +280 -280
- package/es/components/interaction/date-picker/components/common-date-picker/index.vue.mjs +7 -7
- package/es/components/interaction/date-picker/components/common-date-picker/index.vue2.mjs +409 -409
- package/es/components/interaction/date-picker/src/date-picker/index.d.ts +186 -186
- package/es/components/interaction/date-picker/src/date-picker/index.vue.d.ts +186 -186
- package/es/components/interaction/date-picker/src/date-picker-range/index.d.ts +186 -186
- package/es/components/interaction/date-picker/src/date-picker-range/index.vue.d.ts +186 -186
- package/es/components/interaction/tabs/index.vue.mjs +272 -272
- package/es/components/interaction/tabs-icon/index.vue.mjs +277 -277
- package/es/components/interaction-button/index.vue.mjs +7 -7
- package/es/components/interaction-button-image/index.vue.mjs +7 -7
- package/es/components/interaction-button-refresh/index.vue.mjs +7 -7
- package/es/components/interaction-data-picker/index.vue.mjs +7 -7
- package/es/components/interaction-input/index.vue.mjs +7 -7
- package/es/components/interaction-input/index.vue2.mjs +286 -286
- package/es/components/interaction-select/index.vue.mjs +7 -7
- package/es/components/interaction-select/index.vue2.mjs +422 -422
- package/es/components/interaction-slider/index.vue.mjs +7 -7
- package/es/components/interaction-slider/index.vue2.mjs +283 -283
- package/es/components/interaction-switch/index.vue.mjs +7 -7
- package/es/components/interaction-switch/index.vue2.mjs +244 -244
- package/es/components/interaction-tabs/index.vue.mjs +7 -7
- package/es/components/interaction-tabs/index.vue2.mjs +255 -255
- package/es/components/interaction-tabs2/index.vue.mjs +7 -7
- package/es/components/interaction-tabs2/index.vue2.mjs +255 -255
- package/es/components/map-earth-basic/index.vue.mjs +332 -332
- package/es/components/map-earth-cool-tech/index.vue.mjs +332 -332
- package/es/components/map-earth-fly-line/index.vue.mjs +332 -332
- package/es/components/map-earth-hacker/index.vue.mjs +332 -332
- package/es/components/map-earth-particle/index.vue.mjs +332 -332
- package/es/components/media-audio/index.vue.mjs +7 -7
- package/es/components/media-audio/index.vue2.mjs +277 -277
- package/es/components/media-audio-dynamic/index.vue.mjs +7 -7
- package/es/components/media-audio-dynamic/index.vue2.mjs +296 -296
- package/es/components/media-carousel/index.vue.mjs +7 -7
- package/es/components/media-carousel-slides/index.vue.mjs +7 -7
- package/es/components/media-flv/index.vue.mjs +284 -284
- package/es/components/media-iframe/index.vue.mjs +7 -7
- package/es/components/media-iframe/index.vue2.mjs +217 -217
- package/es/components/media-iframe-carousel/index.vue.mjs +7 -7
- package/es/components/media-iframe-dynamic/index.vue.mjs +7 -7
- package/es/components/media-iframe-dynamic/index.vue2.mjs +261 -261
- package/es/components/media-image/index.vue.mjs +7 -7
- package/es/components/media-image-dynamic/index.vue.mjs +7 -7
- package/es/components/media-image-dynamic/index.vue2.mjs +236 -236
- package/es/components/media-m3u8/index.vue.mjs +302 -302
- package/es/components/media-m3u8-dynamic/index.vue.mjs +319 -319
- package/es/components/media-video/index.vue.mjs +7 -7
- package/es/components/media-video/index.vue2.mjs +258 -258
- package/es/components/media-video-dynamic/index.vue.mjs +7 -7
- package/es/components/media-video-dynamic/index.vue2.mjs +280 -280
- package/es/components/media-wavesurfer/index.vue.mjs +7 -7
- package/es/components/scene-amap2d/index.vue.mjs +7 -7
- package/es/components/scene-amap2d/index.vue2.mjs +627 -627
- package/es/components/scene-amap3d/index.vue.mjs +7 -7
- package/es/components/scene-amap3d/index.vue2.mjs +752 -752
- package/es/components/scene-default/index.vue.mjs +7 -7
- package/es/components/scene-default/index.vue2.mjs +221 -221
- package/es/components/scene-map3d/index.vue.mjs +8 -8
- package/es/components/scene-map3d/index.vue2.mjs +480 -480
- package/es/components/scene-ue-iframe/index.vue.mjs +7 -7
- package/es/components/scene-ue-iframe/index.vue2.mjs +242 -242
- package/es/components/scene-ue-shj/index.vue.mjs +7 -7
- package/es/components/scene-ue-shj/index.vue2.mjs +219 -219
- package/es/components/scene-unity-iframe/index.vue.mjs +7 -7
- package/es/components/scene-unity-iframe/index.vue2.mjs +224 -224
- package/es/components/scene-unity-webgl/index.vue.mjs +7 -7
- package/es/components/scene-unity-webgl/index.vue2.mjs +226 -226
- package/es/components/scene-vr/index.d.ts +101 -101
- package/es/components/scene-vr/index.vue.d.ts +102 -102
- package/es/components/scene-vr/index.vue.mjs +7 -7
- package/es/components/scene-vr/index.vue2.mjs +543 -543
- package/es/components/text/list/index.vue.mjs +295 -295
- package/es/components/text-carousel/index.vue.mjs +7 -7
- package/es/components/text-count-down/index.vue.mjs +7 -7
- package/es/components/text-count-down/index.vue2.mjs +284 -284
- package/es/components/text-over-number/index.vue.mjs +7 -7
- package/es/components/text-over-number/index.vue2.mjs +286 -286
- package/es/components/text-real-time/index.vue.mjs +7 -7
- package/es/components/text-real-time/index.vue2.mjs +241 -241
- package/es/components/text-row-scroll/index.vue.mjs +7 -7
- package/es/components/text-row-scroll/index.vue2.mjs +352 -352
- package/es/components/text-table-basic/index.vue.mjs +7 -7
- package/es/components/text-table-basic/index.vue2.mjs +366 -366
- package/es/components/text-table-scroll/index.vue.mjs +7 -7
- package/es/components/text-table-scroll/index.vue2.mjs +356 -356
- package/es/components/text-text-basic/index.vue.mjs +7 -7
- package/es/components/text-text-dynamic/index.vue.mjs +7 -7
- package/es/components/text-text-dynamic/index.vue2.mjs +242 -242
- package/es/components/text-title/index.vue.mjs +7 -7
- package/es/index.mjs +388 -388
- package/es/plugins/datasource/index.mjs +216 -216
- package/es/widgets.css +1 -1
- package/package.json +2 -2
- package/umd/index.js +33660 -0
- package/umd/widgets.css +1 -0
|
@@ -1,627 +1,627 @@
|
|
|
1
|
-
import { defineComponent as E, watch as c, createElementBlock as X, openBlock as Y, normalizeClass as $, unref as ee, createElementVNode as te, shallowRef as L, ref as y, onMounted as re, onUnmounted as oe } from "vue";
|
|
2
|
-
import ae from "@amap/amap-jsapi-loader";
|
|
3
|
-
import ie from "axios";
|
|
4
|
-
import { nanoid as se } from "nanoid";
|
|
5
|
-
import "../text-text-basic/index.mjs";
|
|
6
|
-
import "../text-table-basic/index.mjs";
|
|
7
|
-
import "../chart-other-gauge/index.mjs";
|
|
8
|
-
import "../chart-other-gauge-stage/index.mjs";
|
|
9
|
-
import "../chart-other-gauge-grade/index.mjs";
|
|
10
|
-
import "../chart-other-word-cloud/index.mjs";
|
|
11
|
-
import "../chart-other-liquidfill/index.mjs";
|
|
12
|
-
import "../chart-other-funnel/index.mjs";
|
|
13
|
-
import "../chart-other-force/index.mjs";
|
|
14
|
-
import "../chart-other-radar/index.mjs";
|
|
15
|
-
import "../chart-other-funnel-split/index.mjs";
|
|
16
|
-
import "../chart-other-funnel-contrast/index.mjs";
|
|
17
|
-
import "../chart-other-candlestick-basic/index.mjs";
|
|
18
|
-
import "../chart-other-candlestick-shanghai/index.mjs";
|
|
19
|
-
import "../chart-other-candlestick-demo/index.mjs";
|
|
20
|
-
import "../chart-other-heatmap/index.mjs";
|
|
21
|
-
import "../chart-other-force2/index.mjs";
|
|
22
|
-
import "../chart-other-graph-basic/index.mjs";
|
|
23
|
-
import "../chart-other-graph-basic2/index.mjs";
|
|
24
|
-
import "../chart-other-graph-calendar/index.mjs";
|
|
25
|
-
import "../chart-other-tree-line/index.mjs";
|
|
26
|
-
import "../chart-other-treemap-basic/index.mjs";
|
|
27
|
-
import "../chart-other-sunburst-basic/index.mjs";
|
|
28
|
-
import "../chart-other-sunburst-basic2/index.mjs";
|
|
29
|
-
import "../chart-other-sunburst-basic3/index.mjs";
|
|
30
|
-
import "../chart-other-sunburst-basic4/index.mjs";
|
|
31
|
-
import "../chart-other-sunburst-book/index.mjs";
|
|
32
|
-
import "../chart-other-sunburst-radius/index.mjs";
|
|
33
|
-
import "../chart-other-sunburst-flavors/index.mjs";
|
|
34
|
-
import "../chart-other-parallel-basic/index.mjs";
|
|
35
|
-
import "../chart-other-parallel-mul/index.mjs";
|
|
36
|
-
import "../chart-other-circular-graph/index.mjs";
|
|
37
|
-
import "../map-earth-basic/index.mjs";
|
|
38
|
-
import "../map-earth-cool-tech/index.mjs";
|
|
39
|
-
import "../map-earth-particle/index.mjs";
|
|
40
|
-
import "../map-earth-hacker/index.mjs";
|
|
41
|
-
import "../map-earth-fly-line/index.mjs";
|
|
42
|
-
import "../chart-other-grid-percentage/index.mjs";
|
|
43
|
-
import "../chart-other-radar-stack/index.mjs";
|
|
44
|
-
import "../chart-other-funnel2/index.mjs";
|
|
45
|
-
import "../chart-other-label-gauge/index.mjs";
|
|
46
|
-
import "../chart-other-theme-river/index.mjs";
|
|
47
|
-
import "../chart-other-tree/index.mjs";
|
|
48
|
-
import "../chart-other-treemap/index.mjs";
|
|
49
|
-
import "../commons-product-model/index.mjs";
|
|
50
|
-
import "../commons-vr-photo/index.mjs";
|
|
51
|
-
import "../commons-vr-video/index.mjs";
|
|
52
|
-
import "../commons-three-loader/index.mjs";
|
|
53
|
-
import "../commons-three-loader3/index.mjs";
|
|
54
|
-
import "../commons-loop-iterator/index.mjs";
|
|
55
|
-
import "../commons-gaussian-splatting-view/index.mjs";
|
|
56
|
-
import "../commons-babylon/index.mjs";
|
|
57
|
-
import "../commons-svg/index.mjs";
|
|
58
|
-
import "../commons-weather/index.mjs";
|
|
59
|
-
import "../commons-weather-dynamic/index.mjs";
|
|
60
|
-
import "../media-wavesurfer/index.mjs";
|
|
61
|
-
import "../interaction-tabs/index.mjs";
|
|
62
|
-
import "../interaction-tabs2/index.mjs";
|
|
63
|
-
import "../interaction-button/index.mjs";
|
|
64
|
-
import "../interaction-button-image/index.mjs";
|
|
65
|
-
import "../interaction-select/index.mjs";
|
|
66
|
-
import "../interaction-input/index.mjs";
|
|
67
|
-
import "../interaction-radio/index.mjs";
|
|
68
|
-
import "../interaction-slider/index.mjs";
|
|
69
|
-
import "../interaction-switch/index.mjs";
|
|
70
|
-
import "../interaction-data-picker/index.mjs";
|
|
71
|
-
import "../interaction-button-refresh/index.mjs";
|
|
72
|
-
import "../media-image/index.mjs";
|
|
73
|
-
import "../text-title/index.mjs";
|
|
74
|
-
import "../commons-qrcode/index.mjs";
|
|
75
|
-
import "../media-video/index.mjs";
|
|
76
|
-
import "../media-audio/index.mjs";
|
|
77
|
-
import "../text-real-time/index.mjs";
|
|
78
|
-
import "../media-carousel/index.mjs";
|
|
79
|
-
import "../media-carousel-slides/index.mjs";
|
|
80
|
-
import "../media-iframe-carousel/index.mjs";
|
|
81
|
-
import "../media-iframe/index.mjs";
|
|
82
|
-
import "../media-m3u8/index.mjs";
|
|
83
|
-
import "../media-m3u8-dynamic/index.mjs";
|
|
84
|
-
import "../media-audio-dynamic/index.mjs";
|
|
85
|
-
import "../media-video-dynamic/index.mjs";
|
|
86
|
-
import "../media-image-dynamic/index.mjs";
|
|
87
|
-
import "../media-iframe-dynamic/index.mjs";
|
|
88
|
-
import "../media-flv/index.mjs";
|
|
89
|
-
import "../commons-echarts/index.mjs";
|
|
90
|
-
import "../text-over-number/index.mjs";
|
|
91
|
-
import "../text-table-scroll/index.mjs";
|
|
92
|
-
import "../text-carousel/index.mjs";
|
|
93
|
-
import "../text-row-scroll/index.mjs";
|
|
94
|
-
import "../text-text-dynamic/index.mjs";
|
|
95
|
-
import "../text-count-down/index.mjs";
|
|
96
|
-
import "../graphical-circle/index.mjs";
|
|
97
|
-
import "../graphical-diamond/index.mjs";
|
|
98
|
-
import "../graphical-hexagon/index.mjs";
|
|
99
|
-
import "../graphical-isosceles-triangle/index.mjs";
|
|
100
|
-
import "../graphical-pentagon/index.mjs";
|
|
101
|
-
import "../graphical-rect/index.mjs";
|
|
102
|
-
import "../graphical-right-triangle/index.mjs";
|
|
103
|
-
import "../scene-map3d/index.mjs";
|
|
104
|
-
import "./index.mjs";
|
|
105
|
-
import "../scene-amap3d/index.mjs";
|
|
106
|
-
import "../scene-vr/index.mjs";
|
|
107
|
-
import "../scene-unity-iframe/index.mjs";
|
|
108
|
-
import "../scene-unity-webgl/index.mjs";
|
|
109
|
-
import "../scene-ue-iframe/index.mjs";
|
|
110
|
-
import "../scene-ue-shj/index.mjs";
|
|
111
|
-
import "../scene-default/index.mjs";
|
|
112
|
-
import "../interaction/tabs/index.mjs";
|
|
113
|
-
import "../interaction/tabs-icon/index.mjs";
|
|
114
|
-
import "../interaction/button/index.mjs";
|
|
115
|
-
import "../interaction/date-picker/src/date-picker/index.mjs";
|
|
116
|
-
import "../interaction/date-picker/src/date-picker-range/index.mjs";
|
|
117
|
-
import "../text/list/index.mjs";
|
|
118
|
-
import "../chart/src/bar/basic/index.mjs";
|
|
119
|
-
import "../chart/src/bar/animation/index.mjs";
|
|
120
|
-
import "../chart/src/bar/contrast/index.mjs";
|
|
121
|
-
import "../chart/src/bar/contrast2/index.mjs";
|
|
122
|
-
import "../chart/src/bar/contrast3/index.mjs";
|
|
123
|
-
import "../chart/src/bar/gradient-column-chart/index.mjs";
|
|
124
|
-
import "../chart/src/bar/horizontal/index.mjs";
|
|
125
|
-
import "../chart/src/bar/horizontal-stack/index.mjs";
|
|
126
|
-
import "../chart/src/bar/line-bar/index.mjs";
|
|
127
|
-
import "../chart/src/bar/line-bar2/index.mjs";
|
|
128
|
-
import "../chart/src/bar/loop/index.mjs";
|
|
129
|
-
import "../chart/src/bar/mini/index.mjs";
|
|
130
|
-
import "../chart/src/bar/polar/index.mjs";
|
|
131
|
-
import "../chart/src/bar/polar-stack/index.mjs";
|
|
132
|
-
import "../chart/src/bar/polar2/index.mjs";
|
|
133
|
-
import "../chart/src/bar/radius-circle/index.mjs";
|
|
134
|
-
import "../chart/src/bar/rank/index.mjs";
|
|
135
|
-
import "../chart/src/bar/segmented-progress/index.mjs";
|
|
136
|
-
import "../chart/src/bar/spire/index.mjs";
|
|
137
|
-
import "../chart/src/bar/stack/index.mjs";
|
|
138
|
-
import "../chart/src/bar/stack-line/index.mjs";
|
|
139
|
-
import "../chart/src/bar/stack2/index.mjs";
|
|
140
|
-
import "../chart/src/bar/stack3/index.mjs";
|
|
141
|
-
import "../chart/src/bar/staggered/index.mjs";
|
|
142
|
-
import "../chart/src/bar/three/index.mjs";
|
|
143
|
-
import "../chart/src/bar/waterfall/index.mjs";
|
|
144
|
-
import "../chart/src/bar/zebra/index.mjs";
|
|
145
|
-
import "../chart/src/line/area-gradient/index.mjs";
|
|
146
|
-
import "../chart/src/line/area-highlight/index.mjs";
|
|
147
|
-
import "../chart/src/line/area-highlight2/index.mjs";
|
|
148
|
-
import "../chart/src/line/basic/index.mjs";
|
|
149
|
-
import "../chart/src/line/bump/index.mjs";
|
|
150
|
-
import "../chart/src/line/dashed/index.mjs";
|
|
151
|
-
import "../chart/src/line/ladder/index.mjs";
|
|
152
|
-
import "../chart/src/line/logarithm/index.mjs";
|
|
153
|
-
import "../chart/src/line/multix/index.mjs";
|
|
154
|
-
import "../chart/src/line/polar-double/index.mjs";
|
|
155
|
-
import "../chart/src/line/rain-flow/index.mjs";
|
|
156
|
-
import "../chart/src/line/scale/index.mjs";
|
|
157
|
-
import "../chart/src/line/smooth/index.mjs";
|
|
158
|
-
import "../chart/src/line/smooth-area/index.mjs";
|
|
159
|
-
import "../chart/src/line/stack/index.mjs";
|
|
160
|
-
import "../chart/src/line/stack-area/index.mjs";
|
|
161
|
-
import "../chart/src/line/temp/index.mjs";
|
|
162
|
-
import "../chart/src/line/vertical/index.mjs";
|
|
163
|
-
import "../chart/src/map/basic/index.mjs";
|
|
164
|
-
import "../chart/src/map/bmap-basic/index.mjs";
|
|
165
|
-
import "../chart/src/map/bmap-heatmap/index.mjs";
|
|
166
|
-
import "../chart/src/map/bmap-rich/index.mjs";
|
|
167
|
-
import "../chart/src/map/customize/index.mjs";
|
|
168
|
-
import "../chart/src/map/lines/index.mjs";
|
|
169
|
-
import "../chart/src/map/scatter/index.mjs";
|
|
170
|
-
import "../chart/src/pie/3d/index.mjs";
|
|
171
|
-
import "../chart/src/pie/basic/index.mjs";
|
|
172
|
-
import "../chart/src/pie/basic2/index.mjs";
|
|
173
|
-
import "../chart/src/pie/customized/index.mjs";
|
|
174
|
-
import "../chart/src/pie/index/index.mjs";
|
|
175
|
-
import "../chart/src/pie/interval/index.mjs";
|
|
176
|
-
import "../chart/src/pie/legend-scroll/index.mjs";
|
|
177
|
-
import "../chart/src/pie/radius/index.mjs";
|
|
178
|
-
import "../chart/src/pie/rose/index.mjs";
|
|
179
|
-
import "../chart/src/pie/round/index.mjs";
|
|
180
|
-
import "../chart/src/pie/sunburst/index.mjs";
|
|
181
|
-
import "../chart/src/scatter/basic/index.mjs";
|
|
182
|
-
import "../chart/src/scatter/basic2/index.mjs";
|
|
183
|
-
import "../chart/src/scatter/bubble/index.mjs";
|
|
184
|
-
import "../chart/src/scatter/ripples/index.mjs";
|
|
185
|
-
import "../commons/custom-component-render/index.mjs";
|
|
186
|
-
/* empty css */
|
|
187
|
-
/* empty css */
|
|
188
|
-
import { SHJDatasourceV2 as le } from "../../plugins/datasource/index.mjs";
|
|
189
|
-
import { SHJParseEvent as d } from "../../plugins/event/index.mjs";
|
|
190
|
-
import "lodash";
|
|
191
|
-
const ne = E({ name: "zv-scene-amap2d" }), Po = /* @__PURE__ */ E({
|
|
192
|
-
...ne,
|
|
193
|
-
props: {
|
|
194
|
-
basicOption: {},
|
|
195
|
-
sources: {},
|
|
196
|
-
useEvents: {},
|
|
197
|
-
uuid: {}
|
|
198
|
-
},
|
|
199
|
-
emits: [
|
|
200
|
-
"amap2d-scene-success",
|
|
201
|
-
"amap2d-scene-zoomstart",
|
|
202
|
-
"amap2d-scene-zoomend",
|
|
203
|
-
"amap2d-scene-mapclick",
|
|
204
|
-
"amap2d-scene-dragstart",
|
|
205
|
-
"amap2d-scene-dragging",
|
|
206
|
-
"amap2d-scene-dragend"
|
|
207
|
-
],
|
|
208
|
-
setup(M, { expose: A, emit: I }) {
|
|
209
|
-
const a = M, u = I;
|
|
210
|
-
d.parseEvents(a.useEvents, "on-page-loaded", null);
|
|
211
|
-
const B = () => {
|
|
212
|
-
const i = L(), l = L(), C = y(!1), f = y(), v = y(), b = y(), p = y(), w = (t) => {
|
|
213
|
-
S(), window._AMapSecurityConfig = {
|
|
214
|
-
securityJsCode: t.basic.securityJsCode
|
|
215
|
-
}, ae.load({
|
|
216
|
-
key: t.basic.key,
|
|
217
|
-
// 申请好的Web端开发者Key,首次调用 load 时必填
|
|
218
|
-
version: "2.0",
|
|
219
|
-
// 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
220
|
-
Loca: {
|
|
221
|
-
version: "2.0.0"
|
|
222
|
-
},
|
|
223
|
-
plugins: ["AMap.ControlBar", "AMap.ToolBar", "AMap.Scale", "AMap.HeatMap", "AMap.GeoJSON", "AMap.ImageLayer", "AMap.TileLayer"]
|
|
224
|
-
}).then((e) => {
|
|
225
|
-
p.value = e;
|
|
226
|
-
const o = new p.value.createDefaultLayer({
|
|
227
|
-
visible: !0,
|
|
228
|
-
// 是否可见
|
|
229
|
-
opacity: 1,
|
|
230
|
-
// 透明度
|
|
231
|
-
zIndex: 0
|
|
232
|
-
// 叠加层级
|
|
233
|
-
});
|
|
234
|
-
i.value = new e.Map("zerov-amap-2d", {
|
|
235
|
-
rotateEnable: t.config.rotateEnable,
|
|
236
|
-
// 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
|
|
237
|
-
pitchEnable: t.config.pitchEnable,
|
|
238
|
-
// 是否开启地图倾斜交互 鼠标右键 + 鼠标上下移动或键盘Ctrl + 鼠标上下移动
|
|
239
|
-
zoomEnable: t.config.zoomEnable,
|
|
240
|
-
dragEnable: t.config.dragEnable,
|
|
241
|
-
zoom: t.config.zoom,
|
|
242
|
-
// 初始化地图层级
|
|
243
|
-
viewMode: "2D",
|
|
244
|
-
// 开启3D视图,默认为关闭
|
|
245
|
-
zooms: t.config.zooms,
|
|
246
|
-
// 地图显示的缩放级别范围
|
|
247
|
-
center: t.config.center,
|
|
248
|
-
// 初始地图中心经纬度
|
|
249
|
-
mapStyle: t.config.mapStyle,
|
|
250
|
-
features: t.config.features,
|
|
251
|
-
layers: [o]
|
|
252
|
-
}), l.value = new window.Loca.Container({
|
|
253
|
-
map: i.value
|
|
254
|
-
}), b.value = new p.value.Scale({
|
|
255
|
-
visible: t.config.plugin.scale.visible,
|
|
256
|
-
position: {
|
|
257
|
-
left: t.config.plugin.scale.position.left + "px",
|
|
258
|
-
bottom: t.config.plugin.scale.position.bottom + "px"
|
|
259
|
-
}
|
|
260
|
-
}), i.value.addControl(b.value), f.value = new e.ControlBar({
|
|
261
|
-
visible: t.config.plugin.controlBar.visible,
|
|
262
|
-
showControlButton: t.config.plugin.controlBar.showControlButton,
|
|
263
|
-
position: {
|
|
264
|
-
right: t.config.plugin.controlBar.position.right + "px",
|
|
265
|
-
top: t.config.plugin.controlBar.position.top + "px"
|
|
266
|
-
}
|
|
267
|
-
}), i.value.addControl(f.value), v.value = new e.ToolBar({
|
|
268
|
-
visible: t.config.plugin.toolBar.visible,
|
|
269
|
-
position: {
|
|
270
|
-
left: t.config.plugin.toolBar.position.left + "px",
|
|
271
|
-
top: t.config.plugin.toolBar.position.top + "px"
|
|
272
|
-
}
|
|
273
|
-
}), i.value.addControl(v.value), x(e), i.value.on("complete", () => {
|
|
274
|
-
setTimeout(() => {
|
|
275
|
-
C.value = !0, u("amap2d-scene-success"), d.parseEvents(a.useEvents, "amap2d-scene-success", null);
|
|
276
|
-
}, 666);
|
|
277
|
-
}), i.value.on("zoomstart", () => {
|
|
278
|
-
u("amap2d-scene-zoomstart"), d.parseEvents(a.useEvents, "amap2d-scene-zoomstart", null);
|
|
279
|
-
}), i.value.on("zoomend", () => {
|
|
280
|
-
u("amap2d-scene-zoomend"), d.parseEvents(a.useEvents, "amap2d-scene-zoomend", null);
|
|
281
|
-
}), i.value.on("click", (r) => {
|
|
282
|
-
u("amap2d-scene-mapclick", r.lnglat), d.parseEvents(a.useEvents, "amap2d-scene-mapclick", r.lnglat);
|
|
283
|
-
}), i.value.on("dragstart", (r) => {
|
|
284
|
-
u("amap2d-scene-dragstart", r.lnglat), d.parseEvents(a.useEvents, "amap2d-scene-dragstart", r.lnglat);
|
|
285
|
-
}), i.value.on("dragend", (r) => {
|
|
286
|
-
u("amap2d-scene-dragend", r.lnglat), d.parseEvents(a.useEvents, "amap2d-scene-dragend", r.lnglat);
|
|
287
|
-
});
|
|
288
|
-
}).catch((e) => {
|
|
289
|
-
});
|
|
290
|
-
}, x = (t) => {
|
|
291
|
-
a.sources && a.sources.length > 0 ? le.parse({
|
|
292
|
-
tId: a.uuid,
|
|
293
|
-
sources: a.sources,
|
|
294
|
-
callback: (o) => {
|
|
295
|
-
try {
|
|
296
|
-
const r = a.basicOption.widgets.find((s) => s._sourceId === o.id);
|
|
297
|
-
r && r.type === "heatmap" && G(t, r, o.data[0].data), r && r.type === "dotlayers" && H(window.Loca, r, z(o.data[0].data)), r && r.type === "scatter" && Z(window.Loca, r, z(o.data[0].data)), r && r.type === "labelsLayer" && j(window.Loca, r, z(o.data[0].data));
|
|
298
|
-
} catch {
|
|
299
|
-
}
|
|
300
|
-
a.basicOption.widgets.filter((r) => r.type === "boundary").forEach((r) => {
|
|
301
|
-
O(t, r);
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}) : a.basicOption.widgets.filter((o) => o.type === "boundary").forEach((o) => {
|
|
305
|
-
O(t, o);
|
|
306
|
-
});
|
|
307
|
-
const e = i.value.getLayers();
|
|
308
|
-
for (let o = 0; o < e.length; o++)
|
|
309
|
-
(e[o].type === "sketchTileLayer" || e[o]._opts.type === "sketchImageLayer") && i.value.removeLayer(e[o]);
|
|
310
|
-
a.basicOption.widgets.filter((o) => o.type === "sketchTile").forEach((o) => {
|
|
311
|
-
const r = N(o);
|
|
312
|
-
r && i.value.addLayer(r);
|
|
313
|
-
}), a.basicOption.widgets.filter((o) => o.type === "sketchImage").forEach((o) => {
|
|
314
|
-
const r = F(o);
|
|
315
|
-
i.value.addLayer(r);
|
|
316
|
-
});
|
|
317
|
-
}, P = (t) => {
|
|
318
|
-
const o = t.slice(t.indexOf("(") + 1, t.lastIndexOf(")")).split(",").map((s) => s.trim()), r = {};
|
|
319
|
-
for (let s = 1; s < o.length; s++) {
|
|
320
|
-
const m = o[s].split(" "), n = m[0], h = parseFloat(m[1]) / 100, Q = Math.round(h * 100) / 100;
|
|
321
|
-
r[Q] = n;
|
|
322
|
-
}
|
|
323
|
-
return r;
|
|
324
|
-
}, N = (t) => {
|
|
325
|
-
try {
|
|
326
|
-
return new p.value.TileLayer({
|
|
327
|
-
bounds: new p.value.Bounds(
|
|
328
|
-
t.bounds[0],
|
|
329
|
-
t.bounds[1]
|
|
330
|
-
),
|
|
331
|
-
getTileUrl: function(o, r, s) {
|
|
332
|
-
try {
|
|
333
|
-
return t.url.replace("{z}", s).replace("{x}", o).replace("{y}", r);
|
|
334
|
-
} catch {
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
type: "sketchTileLayer",
|
|
338
|
-
tileSize: t.tileSize,
|
|
339
|
-
opacity: t.opacity,
|
|
340
|
-
zIndex: t.zIndex,
|
|
341
|
-
zooms: t.zooms
|
|
342
|
-
});
|
|
343
|
-
} catch {
|
|
344
|
-
}
|
|
345
|
-
return null;
|
|
346
|
-
}, F = (t) => {
|
|
347
|
-
try {
|
|
348
|
-
return new p.value.ImageLayer({
|
|
349
|
-
bounds: new p.value.Bounds(
|
|
350
|
-
t.bounds[0],
|
|
351
|
-
// 左下 手绘图左下相对于地图的经纬度
|
|
352
|
-
t.bounds[1]
|
|
353
|
-
// 右上 手绘图右上相对于地图的经纬度
|
|
354
|
-
),
|
|
355
|
-
type: "sketchImageLayer",
|
|
356
|
-
opacity: t.opacity,
|
|
357
|
-
url: t.url,
|
|
358
|
-
zIndex: t.zIndex,
|
|
359
|
-
zooms: t.zooms
|
|
360
|
-
// 设置可见级别,[最小级别,最大级别]
|
|
361
|
-
});
|
|
362
|
-
} catch {
|
|
363
|
-
}
|
|
364
|
-
return null;
|
|
365
|
-
}, G = (t, e, o) => {
|
|
366
|
-
try {
|
|
367
|
-
const r = new t.HeatMap(i.value, {
|
|
368
|
-
radius: e.radius,
|
|
369
|
-
// 给定半径
|
|
370
|
-
opacity: e.opacity,
|
|
371
|
-
gradient: P(e.gradient)
|
|
372
|
-
});
|
|
373
|
-
setTimeout(() => {
|
|
374
|
-
r.setDataSet({
|
|
375
|
-
data: o,
|
|
376
|
-
max: e.max
|
|
377
|
-
});
|
|
378
|
-
}, 0);
|
|
379
|
-
} catch {
|
|
380
|
-
}
|
|
381
|
-
}, O = async (t, e) => {
|
|
382
|
-
try {
|
|
383
|
-
const o = await ie.get(e.geojson);
|
|
384
|
-
if (o.status === 200) {
|
|
385
|
-
const r = new t.GeoJSON({
|
|
386
|
-
geoJSON: o.data,
|
|
387
|
-
getPolygon: function(s, m) {
|
|
388
|
-
const n = new t.Polygon({
|
|
389
|
-
path: m,
|
|
390
|
-
zIndex: e.zIndex,
|
|
391
|
-
fillColor: e.style.fillColor,
|
|
392
|
-
// 填充色
|
|
393
|
-
strokeOpacity: e.style.strokeOpacity,
|
|
394
|
-
// 轮廓线透明度
|
|
395
|
-
fillOpacity: e.style.fillOpacity,
|
|
396
|
-
// 填充色透明度
|
|
397
|
-
strokeColor: e.style.strokeColor,
|
|
398
|
-
// 线条颜色
|
|
399
|
-
strokeWeight: e.style.strokeWeight,
|
|
400
|
-
// 线条宽度
|
|
401
|
-
strokeStyle: e.style.strokeStyle
|
|
402
|
-
// 线条样式
|
|
403
|
-
});
|
|
404
|
-
return n.on("mouseover", () => {
|
|
405
|
-
n.setOptions({
|
|
406
|
-
fillOpacity: e.mouseover.fillOpacity,
|
|
407
|
-
fillColor: e.mouseover.fillColor,
|
|
408
|
-
strokeOpacity: e.mouseover.strokeOpacity,
|
|
409
|
-
strokeColor: e.mouseover.strokeColor,
|
|
410
|
-
strokeStyle: e.mouseover.strokeStyle,
|
|
411
|
-
strokeWeight: e.mouseover.strokeWeight
|
|
412
|
-
});
|
|
413
|
-
}), n.on("mouseout", () => {
|
|
414
|
-
n.setOptions({
|
|
415
|
-
fillColor: e.style.fillColor,
|
|
416
|
-
// 填充色
|
|
417
|
-
strokeOpacity: e.style.strokeOpacity,
|
|
418
|
-
// 轮廓线透明度
|
|
419
|
-
fillOpacity: e.style.fillOpacity,
|
|
420
|
-
// 填充色透明度
|
|
421
|
-
strokeColor: e.style.strokeColor,
|
|
422
|
-
// 线条颜色
|
|
423
|
-
strokeWeight: e.style.strokeWeight,
|
|
424
|
-
// 线条宽度
|
|
425
|
-
strokeStyle: e.style.strokeStyle
|
|
426
|
-
// 线条样式
|
|
427
|
-
});
|
|
428
|
-
}), n;
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
i.value.add(r);
|
|
432
|
-
}
|
|
433
|
-
} catch {
|
|
434
|
-
}
|
|
435
|
-
}, H = (t, e, o) => {
|
|
436
|
-
try {
|
|
437
|
-
const r = new t.GeoJSONSource({
|
|
438
|
-
data: o
|
|
439
|
-
}), s = new t.PointLayer({
|
|
440
|
-
zIndex: e.zIndex,
|
|
441
|
-
blend: e.blend,
|
|
442
|
-
visible: e.visible,
|
|
443
|
-
opacity: e.opacity
|
|
444
|
-
}), m = {
|
|
445
|
-
radius: e.style.radius,
|
|
446
|
-
unit: e.style.unit,
|
|
447
|
-
color: e.style.color,
|
|
448
|
-
borderWidth: e.style.borderWidth,
|
|
449
|
-
blurWidth: e.style.blurWidth,
|
|
450
|
-
borderColor: e.style.borderColor
|
|
451
|
-
};
|
|
452
|
-
s.setSource(r), s.setStyle(m), l.value.add(s), s.addAnimate({
|
|
453
|
-
key: e.animate.key,
|
|
454
|
-
value: e.animate.value,
|
|
455
|
-
duration: e.animate.duration,
|
|
456
|
-
easing: e.animate.easing,
|
|
457
|
-
transform: e.animate.transform,
|
|
458
|
-
random: e.animate.random,
|
|
459
|
-
delay: e.animate.delay,
|
|
460
|
-
yoyo: e.animate.yoyo,
|
|
461
|
-
repeat: e.animate.repeat
|
|
462
|
-
});
|
|
463
|
-
} catch {
|
|
464
|
-
}
|
|
465
|
-
}, Z = (t, e, o) => {
|
|
466
|
-
try {
|
|
467
|
-
const r = new t.GeoJSONSource({
|
|
468
|
-
data: o
|
|
469
|
-
}), s = new t.ScatterLayer({
|
|
470
|
-
loca: l.value,
|
|
471
|
-
zIndex: e.zIndex,
|
|
472
|
-
opacity: e.opacity,
|
|
473
|
-
visible: e.visible,
|
|
474
|
-
zooms: e.zooms
|
|
475
|
-
});
|
|
476
|
-
s.setSource(r), s.setStyle({
|
|
477
|
-
unit: e.style.unit,
|
|
478
|
-
size: e.style.size,
|
|
479
|
-
borderWidth: e.style.borderWidth,
|
|
480
|
-
texture: e.style.texture,
|
|
481
|
-
duration: e.style.duration,
|
|
482
|
-
animate: e.style.animate
|
|
483
|
-
}), l.value.animate.start();
|
|
484
|
-
} catch {
|
|
485
|
-
}
|
|
486
|
-
}, j = (t, e, o) => {
|
|
487
|
-
try {
|
|
488
|
-
const r = new t.GeoJSONSource({
|
|
489
|
-
data: o
|
|
490
|
-
}), s = new t.LabelsLayer({
|
|
491
|
-
eventSupport: !0,
|
|
492
|
-
visible: e.visible,
|
|
493
|
-
zooms: e.zooms,
|
|
494
|
-
opacity: e.opacity,
|
|
495
|
-
collision: e.collision,
|
|
496
|
-
allowCollision: e.allowCollision,
|
|
497
|
-
zIndex: e.zIndex
|
|
498
|
-
});
|
|
499
|
-
s.setSource(r), s.setStyle({
|
|
500
|
-
icon: {
|
|
501
|
-
image: e.icon.image,
|
|
502
|
-
size: e.icon.size,
|
|
503
|
-
clipOrigin: e.icon.clipOrigin,
|
|
504
|
-
offset: e.icon.offset,
|
|
505
|
-
anchor: e.icon.anchor
|
|
506
|
-
},
|
|
507
|
-
text: {
|
|
508
|
-
// 每项配置都可使用回调函数来动态配置
|
|
509
|
-
content: (m, n) => n.properties[e.text.content],
|
|
510
|
-
zooms: e.text.zooms,
|
|
511
|
-
offset: e.text.offset,
|
|
512
|
-
direction: e.text.direction,
|
|
513
|
-
style: {
|
|
514
|
-
fontSize: e.text.style.fontSize,
|
|
515
|
-
fillColor: e.text.style.fillColor,
|
|
516
|
-
strokeColor: e.text.style.strokeColor,
|
|
517
|
-
strokeWidth: e.text.style.strokeWidth,
|
|
518
|
-
padding: e.text.style.padding,
|
|
519
|
-
backgroundColor: e.text.style.backgroundColor,
|
|
520
|
-
borderColor: e.text.style.borderColor,
|
|
521
|
-
borderWidth: e.text.style.borderWidth,
|
|
522
|
-
fold: e.text.style.fold,
|
|
523
|
-
fontWeight: e.text.style.fontWeight
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}), s.on("complete", () => {
|
|
527
|
-
const m = s.getLabelsLayer().getAllOverlays();
|
|
528
|
-
for (const n of m)
|
|
529
|
-
n.on("click", (h) => {
|
|
530
|
-
}), n.on("mouseover", (h) => {
|
|
531
|
-
}), n.on("mouseout", (h) => {
|
|
532
|
-
});
|
|
533
|
-
}), l.value.add(s);
|
|
534
|
-
} catch {
|
|
535
|
-
}
|
|
536
|
-
}, z = (t) => {
|
|
537
|
-
const e = {
|
|
538
|
-
type: "FeatureCollection",
|
|
539
|
-
features: []
|
|
540
|
-
};
|
|
541
|
-
return t.forEach((o, r) => {
|
|
542
|
-
const s = {
|
|
543
|
-
type: "Feature",
|
|
544
|
-
id: se(),
|
|
545
|
-
properties: {
|
|
546
|
-
name: o.name || "",
|
|
547
|
-
_draw_type: "point"
|
|
548
|
-
},
|
|
549
|
-
geometry: {
|
|
550
|
-
type: "Point",
|
|
551
|
-
coordinates: o.value
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
e.features.push(s);
|
|
555
|
-
}), e;
|
|
556
|
-
}, R = (t) => {
|
|
557
|
-
i.value.setFeatures(t.config.features), i.value.setStatus({
|
|
558
|
-
dragEnable: t.config.dragEnable,
|
|
559
|
-
zoomEnable: t.config.zoomEnable,
|
|
560
|
-
rotateEnable: t.config.rotateEnable
|
|
561
|
-
}), t.config.plugin.scale.visible ? b.value.show() : b.value.hide(), t.config.plugin.toolBar.visible ? v.value.show() : v.value.hide(), t.config.plugin.controlBar.visible ? f.value.show() : f.value.hide();
|
|
562
|
-
}, V = () => {
|
|
563
|
-
i.value.clearMap(), l.value.clear(), x(p.value);
|
|
564
|
-
}, U = (t) => {
|
|
565
|
-
i.value.setMapStyle(t.config.mapStyle);
|
|
566
|
-
}, q = (t) => {
|
|
567
|
-
i.value.setZoom(t.config.zoom, !1, 200);
|
|
568
|
-
}, K = (t) => {
|
|
569
|
-
i.value.setCenter(t.config.center, !1, 200);
|
|
570
|
-
}, S = () => {
|
|
571
|
-
i.value && (i.value.clearMap(), i.value.destroy(), i.value = null, l.value && (l.value.clear(), l.value.destroy(), l.value = null));
|
|
572
|
-
};
|
|
573
|
-
return re(() => {
|
|
574
|
-
setTimeout(() => {
|
|
575
|
-
w(a.basicOption);
|
|
576
|
-
}, 0);
|
|
577
|
-
}), oe(() => S()), {
|
|
578
|
-
initAMap2d: w,
|
|
579
|
-
updateAMapStyle: U,
|
|
580
|
-
updateAMapConfig: R,
|
|
581
|
-
updateAMapComponents: V,
|
|
582
|
-
updateAMapZoom: q,
|
|
583
|
-
updateAMapCenter: K,
|
|
584
|
-
amap2d: i,
|
|
585
|
-
loading: C,
|
|
586
|
-
AMapPrototype: p
|
|
587
|
-
};
|
|
588
|
-
}, {
|
|
589
|
-
initAMap2d: g,
|
|
590
|
-
updateAMapStyle: W,
|
|
591
|
-
updateAMapConfig: k,
|
|
592
|
-
updateAMapComponents: D,
|
|
593
|
-
updateAMapZoom: T,
|
|
594
|
-
updateAMapCenter: _,
|
|
595
|
-
loading: J
|
|
596
|
-
} = B();
|
|
597
|
-
return c(() => a.basicOption.config, () => {
|
|
598
|
-
k(a.basicOption);
|
|
599
|
-
}, { deep: !0 }), c(() => a.basicOption.config.zoom, () => {
|
|
600
|
-
T(a.basicOption);
|
|
601
|
-
}, { deep: !0 }), c(() => a.basicOption.config.center, () => {
|
|
602
|
-
_(a.basicOption);
|
|
603
|
-
}, { deep: !0 }), c(() => a.basicOption.widgets, () => {
|
|
604
|
-
D();
|
|
605
|
-
}, { deep: !0 }), c(() => a.basicOption.config.mapStyle, () => {
|
|
606
|
-
W(a.basicOption);
|
|
607
|
-
}, { deep: !0 }), c(() => a.basicOption.basic, () => {
|
|
608
|
-
g(a.basicOption);
|
|
609
|
-
}, { deep: !0 }), c(() => a.sources, () => {
|
|
610
|
-
g(a.basicOption);
|
|
611
|
-
}, { deep: !0 }), A({
|
|
612
|
-
refresh: () => g(a.basicOption),
|
|
613
|
-
refreshView: () => k(a.basicOption),
|
|
614
|
-
refreshData: () => g(a.basicOption)
|
|
615
|
-
}), (i, l) => (Y(), X("div", {
|
|
616
|
-
class: $(["amap-2d-wrap", { show: ee(J) }])
|
|
617
|
-
}, l[0] || (l[0] = [
|
|
618
|
-
te("div", {
|
|
619
|
-
id: "zerov-amap-2d",
|
|
620
|
-
class: "zerov-amap-container"
|
|
621
|
-
}, null, -1)
|
|
622
|
-
]), 2));
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
export {
|
|
626
|
-
Po as default
|
|
627
|
-
};
|
|
1
|
+
import { defineComponent as E, watch as c, createElementBlock as X, openBlock as Y, normalizeClass as $, unref as ee, createElementVNode as te, shallowRef as L, ref as y, onMounted as re, onUnmounted as oe } from "vue";
|
|
2
|
+
import ae from "@amap/amap-jsapi-loader";
|
|
3
|
+
import ie from "axios";
|
|
4
|
+
import { nanoid as se } from "nanoid";
|
|
5
|
+
import "../text-text-basic/index.mjs";
|
|
6
|
+
import "../text-table-basic/index.mjs";
|
|
7
|
+
import "../chart-other-gauge/index.mjs";
|
|
8
|
+
import "../chart-other-gauge-stage/index.mjs";
|
|
9
|
+
import "../chart-other-gauge-grade/index.mjs";
|
|
10
|
+
import "../chart-other-word-cloud/index.mjs";
|
|
11
|
+
import "../chart-other-liquidfill/index.mjs";
|
|
12
|
+
import "../chart-other-funnel/index.mjs";
|
|
13
|
+
import "../chart-other-force/index.mjs";
|
|
14
|
+
import "../chart-other-radar/index.mjs";
|
|
15
|
+
import "../chart-other-funnel-split/index.mjs";
|
|
16
|
+
import "../chart-other-funnel-contrast/index.mjs";
|
|
17
|
+
import "../chart-other-candlestick-basic/index.mjs";
|
|
18
|
+
import "../chart-other-candlestick-shanghai/index.mjs";
|
|
19
|
+
import "../chart-other-candlestick-demo/index.mjs";
|
|
20
|
+
import "../chart-other-heatmap/index.mjs";
|
|
21
|
+
import "../chart-other-force2/index.mjs";
|
|
22
|
+
import "../chart-other-graph-basic/index.mjs";
|
|
23
|
+
import "../chart-other-graph-basic2/index.mjs";
|
|
24
|
+
import "../chart-other-graph-calendar/index.mjs";
|
|
25
|
+
import "../chart-other-tree-line/index.mjs";
|
|
26
|
+
import "../chart-other-treemap-basic/index.mjs";
|
|
27
|
+
import "../chart-other-sunburst-basic/index.mjs";
|
|
28
|
+
import "../chart-other-sunburst-basic2/index.mjs";
|
|
29
|
+
import "../chart-other-sunburst-basic3/index.mjs";
|
|
30
|
+
import "../chart-other-sunburst-basic4/index.mjs";
|
|
31
|
+
import "../chart-other-sunburst-book/index.mjs";
|
|
32
|
+
import "../chart-other-sunburst-radius/index.mjs";
|
|
33
|
+
import "../chart-other-sunburst-flavors/index.mjs";
|
|
34
|
+
import "../chart-other-parallel-basic/index.mjs";
|
|
35
|
+
import "../chart-other-parallel-mul/index.mjs";
|
|
36
|
+
import "../chart-other-circular-graph/index.mjs";
|
|
37
|
+
import "../map-earth-basic/index.mjs";
|
|
38
|
+
import "../map-earth-cool-tech/index.mjs";
|
|
39
|
+
import "../map-earth-particle/index.mjs";
|
|
40
|
+
import "../map-earth-hacker/index.mjs";
|
|
41
|
+
import "../map-earth-fly-line/index.mjs";
|
|
42
|
+
import "../chart-other-grid-percentage/index.mjs";
|
|
43
|
+
import "../chart-other-radar-stack/index.mjs";
|
|
44
|
+
import "../chart-other-funnel2/index.mjs";
|
|
45
|
+
import "../chart-other-label-gauge/index.mjs";
|
|
46
|
+
import "../chart-other-theme-river/index.mjs";
|
|
47
|
+
import "../chart-other-tree/index.mjs";
|
|
48
|
+
import "../chart-other-treemap/index.mjs";
|
|
49
|
+
import "../commons-product-model/index.mjs";
|
|
50
|
+
import "../commons-vr-photo/index.mjs";
|
|
51
|
+
import "../commons-vr-video/index.mjs";
|
|
52
|
+
import "../commons-three-loader/index.mjs";
|
|
53
|
+
import "../commons-three-loader3/index.mjs";
|
|
54
|
+
import "../commons-loop-iterator/index.mjs";
|
|
55
|
+
import "../commons-gaussian-splatting-view/index.mjs";
|
|
56
|
+
import "../commons-babylon/index.mjs";
|
|
57
|
+
import "../commons-svg/index.mjs";
|
|
58
|
+
import "../commons-weather/index.mjs";
|
|
59
|
+
import "../commons-weather-dynamic/index.mjs";
|
|
60
|
+
import "../media-wavesurfer/index.mjs";
|
|
61
|
+
import "../interaction-tabs/index.mjs";
|
|
62
|
+
import "../interaction-tabs2/index.mjs";
|
|
63
|
+
import "../interaction-button/index.mjs";
|
|
64
|
+
import "../interaction-button-image/index.mjs";
|
|
65
|
+
import "../interaction-select/index.mjs";
|
|
66
|
+
import "../interaction-input/index.mjs";
|
|
67
|
+
import "../interaction-radio/index.mjs";
|
|
68
|
+
import "../interaction-slider/index.mjs";
|
|
69
|
+
import "../interaction-switch/index.mjs";
|
|
70
|
+
import "../interaction-data-picker/index.mjs";
|
|
71
|
+
import "../interaction-button-refresh/index.mjs";
|
|
72
|
+
import "../media-image/index.mjs";
|
|
73
|
+
import "../text-title/index.mjs";
|
|
74
|
+
import "../commons-qrcode/index.mjs";
|
|
75
|
+
import "../media-video/index.mjs";
|
|
76
|
+
import "../media-audio/index.mjs";
|
|
77
|
+
import "../text-real-time/index.mjs";
|
|
78
|
+
import "../media-carousel/index.mjs";
|
|
79
|
+
import "../media-carousel-slides/index.mjs";
|
|
80
|
+
import "../media-iframe-carousel/index.mjs";
|
|
81
|
+
import "../media-iframe/index.mjs";
|
|
82
|
+
import "../media-m3u8/index.mjs";
|
|
83
|
+
import "../media-m3u8-dynamic/index.mjs";
|
|
84
|
+
import "../media-audio-dynamic/index.mjs";
|
|
85
|
+
import "../media-video-dynamic/index.mjs";
|
|
86
|
+
import "../media-image-dynamic/index.mjs";
|
|
87
|
+
import "../media-iframe-dynamic/index.mjs";
|
|
88
|
+
import "../media-flv/index.mjs";
|
|
89
|
+
import "../commons-echarts/index.mjs";
|
|
90
|
+
import "../text-over-number/index.mjs";
|
|
91
|
+
import "../text-table-scroll/index.mjs";
|
|
92
|
+
import "../text-carousel/index.mjs";
|
|
93
|
+
import "../text-row-scroll/index.mjs";
|
|
94
|
+
import "../text-text-dynamic/index.mjs";
|
|
95
|
+
import "../text-count-down/index.mjs";
|
|
96
|
+
import "../graphical-circle/index.mjs";
|
|
97
|
+
import "../graphical-diamond/index.mjs";
|
|
98
|
+
import "../graphical-hexagon/index.mjs";
|
|
99
|
+
import "../graphical-isosceles-triangle/index.mjs";
|
|
100
|
+
import "../graphical-pentagon/index.mjs";
|
|
101
|
+
import "../graphical-rect/index.mjs";
|
|
102
|
+
import "../graphical-right-triangle/index.mjs";
|
|
103
|
+
import "../scene-map3d/index.mjs";
|
|
104
|
+
import "./index.mjs";
|
|
105
|
+
import "../scene-amap3d/index.mjs";
|
|
106
|
+
import "../scene-vr/index.mjs";
|
|
107
|
+
import "../scene-unity-iframe/index.mjs";
|
|
108
|
+
import "../scene-unity-webgl/index.mjs";
|
|
109
|
+
import "../scene-ue-iframe/index.mjs";
|
|
110
|
+
import "../scene-ue-shj/index.mjs";
|
|
111
|
+
import "../scene-default/index.mjs";
|
|
112
|
+
import "../interaction/tabs/index.mjs";
|
|
113
|
+
import "../interaction/tabs-icon/index.mjs";
|
|
114
|
+
import "../interaction/button/index.mjs";
|
|
115
|
+
import "../interaction/date-picker/src/date-picker/index.mjs";
|
|
116
|
+
import "../interaction/date-picker/src/date-picker-range/index.mjs";
|
|
117
|
+
import "../text/list/index.mjs";
|
|
118
|
+
import "../chart/src/bar/basic/index.mjs";
|
|
119
|
+
import "../chart/src/bar/animation/index.mjs";
|
|
120
|
+
import "../chart/src/bar/contrast/index.mjs";
|
|
121
|
+
import "../chart/src/bar/contrast2/index.mjs";
|
|
122
|
+
import "../chart/src/bar/contrast3/index.mjs";
|
|
123
|
+
import "../chart/src/bar/gradient-column-chart/index.mjs";
|
|
124
|
+
import "../chart/src/bar/horizontal/index.mjs";
|
|
125
|
+
import "../chart/src/bar/horizontal-stack/index.mjs";
|
|
126
|
+
import "../chart/src/bar/line-bar/index.mjs";
|
|
127
|
+
import "../chart/src/bar/line-bar2/index.mjs";
|
|
128
|
+
import "../chart/src/bar/loop/index.mjs";
|
|
129
|
+
import "../chart/src/bar/mini/index.mjs";
|
|
130
|
+
import "../chart/src/bar/polar/index.mjs";
|
|
131
|
+
import "../chart/src/bar/polar-stack/index.mjs";
|
|
132
|
+
import "../chart/src/bar/polar2/index.mjs";
|
|
133
|
+
import "../chart/src/bar/radius-circle/index.mjs";
|
|
134
|
+
import "../chart/src/bar/rank/index.mjs";
|
|
135
|
+
import "../chart/src/bar/segmented-progress/index.mjs";
|
|
136
|
+
import "../chart/src/bar/spire/index.mjs";
|
|
137
|
+
import "../chart/src/bar/stack/index.mjs";
|
|
138
|
+
import "../chart/src/bar/stack-line/index.mjs";
|
|
139
|
+
import "../chart/src/bar/stack2/index.mjs";
|
|
140
|
+
import "../chart/src/bar/stack3/index.mjs";
|
|
141
|
+
import "../chart/src/bar/staggered/index.mjs";
|
|
142
|
+
import "../chart/src/bar/three/index.mjs";
|
|
143
|
+
import "../chart/src/bar/waterfall/index.mjs";
|
|
144
|
+
import "../chart/src/bar/zebra/index.mjs";
|
|
145
|
+
import "../chart/src/line/area-gradient/index.mjs";
|
|
146
|
+
import "../chart/src/line/area-highlight/index.mjs";
|
|
147
|
+
import "../chart/src/line/area-highlight2/index.mjs";
|
|
148
|
+
import "../chart/src/line/basic/index.mjs";
|
|
149
|
+
import "../chart/src/line/bump/index.mjs";
|
|
150
|
+
import "../chart/src/line/dashed/index.mjs";
|
|
151
|
+
import "../chart/src/line/ladder/index.mjs";
|
|
152
|
+
import "../chart/src/line/logarithm/index.mjs";
|
|
153
|
+
import "../chart/src/line/multix/index.mjs";
|
|
154
|
+
import "../chart/src/line/polar-double/index.mjs";
|
|
155
|
+
import "../chart/src/line/rain-flow/index.mjs";
|
|
156
|
+
import "../chart/src/line/scale/index.mjs";
|
|
157
|
+
import "../chart/src/line/smooth/index.mjs";
|
|
158
|
+
import "../chart/src/line/smooth-area/index.mjs";
|
|
159
|
+
import "../chart/src/line/stack/index.mjs";
|
|
160
|
+
import "../chart/src/line/stack-area/index.mjs";
|
|
161
|
+
import "../chart/src/line/temp/index.mjs";
|
|
162
|
+
import "../chart/src/line/vertical/index.mjs";
|
|
163
|
+
import "../chart/src/map/basic/index.mjs";
|
|
164
|
+
import "../chart/src/map/bmap-basic/index.mjs";
|
|
165
|
+
import "../chart/src/map/bmap-heatmap/index.mjs";
|
|
166
|
+
import "../chart/src/map/bmap-rich/index.mjs";
|
|
167
|
+
import "../chart/src/map/customize/index.mjs";
|
|
168
|
+
import "../chart/src/map/lines/index.mjs";
|
|
169
|
+
import "../chart/src/map/scatter/index.mjs";
|
|
170
|
+
import "../chart/src/pie/3d/index.mjs";
|
|
171
|
+
import "../chart/src/pie/basic/index.mjs";
|
|
172
|
+
import "../chart/src/pie/basic2/index.mjs";
|
|
173
|
+
import "../chart/src/pie/customized/index.mjs";
|
|
174
|
+
import "../chart/src/pie/index/index.mjs";
|
|
175
|
+
import "../chart/src/pie/interval/index.mjs";
|
|
176
|
+
import "../chart/src/pie/legend-scroll/index.mjs";
|
|
177
|
+
import "../chart/src/pie/radius/index.mjs";
|
|
178
|
+
import "../chart/src/pie/rose/index.mjs";
|
|
179
|
+
import "../chart/src/pie/round/index.mjs";
|
|
180
|
+
import "../chart/src/pie/sunburst/index.mjs";
|
|
181
|
+
import "../chart/src/scatter/basic/index.mjs";
|
|
182
|
+
import "../chart/src/scatter/basic2/index.mjs";
|
|
183
|
+
import "../chart/src/scatter/bubble/index.mjs";
|
|
184
|
+
import "../chart/src/scatter/ripples/index.mjs";
|
|
185
|
+
import "../commons/custom-component-render/index.mjs";
|
|
186
|
+
/* empty css */
|
|
187
|
+
/* empty css */
|
|
188
|
+
import { SHJDatasourceV2 as le } from "../../plugins/datasource/index.mjs";
|
|
189
|
+
import { SHJParseEvent as d } from "../../plugins/event/index.mjs";
|
|
190
|
+
import "lodash";
|
|
191
|
+
const ne = E({ name: "zv-scene-amap2d" }), Po = /* @__PURE__ */ E({
|
|
192
|
+
...ne,
|
|
193
|
+
props: {
|
|
194
|
+
basicOption: {},
|
|
195
|
+
sources: {},
|
|
196
|
+
useEvents: {},
|
|
197
|
+
uuid: {}
|
|
198
|
+
},
|
|
199
|
+
emits: [
|
|
200
|
+
"amap2d-scene-success",
|
|
201
|
+
"amap2d-scene-zoomstart",
|
|
202
|
+
"amap2d-scene-zoomend",
|
|
203
|
+
"amap2d-scene-mapclick",
|
|
204
|
+
"amap2d-scene-dragstart",
|
|
205
|
+
"amap2d-scene-dragging",
|
|
206
|
+
"amap2d-scene-dragend"
|
|
207
|
+
],
|
|
208
|
+
setup(M, { expose: A, emit: I }) {
|
|
209
|
+
const a = M, u = I;
|
|
210
|
+
d.parseEvents(a.useEvents, "on-page-loaded", null);
|
|
211
|
+
const B = () => {
|
|
212
|
+
const i = L(), l = L(), C = y(!1), f = y(), v = y(), b = y(), p = y(), w = (t) => {
|
|
213
|
+
S(), window._AMapSecurityConfig = {
|
|
214
|
+
securityJsCode: t.basic.securityJsCode
|
|
215
|
+
}, ae.load({
|
|
216
|
+
key: t.basic.key,
|
|
217
|
+
// 申请好的Web端开发者Key,首次调用 load 时必填
|
|
218
|
+
version: "2.0",
|
|
219
|
+
// 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
220
|
+
Loca: {
|
|
221
|
+
version: "2.0.0"
|
|
222
|
+
},
|
|
223
|
+
plugins: ["AMap.ControlBar", "AMap.ToolBar", "AMap.Scale", "AMap.HeatMap", "AMap.GeoJSON", "AMap.ImageLayer", "AMap.TileLayer"]
|
|
224
|
+
}).then((e) => {
|
|
225
|
+
p.value = e;
|
|
226
|
+
const o = new p.value.createDefaultLayer({
|
|
227
|
+
visible: !0,
|
|
228
|
+
// 是否可见
|
|
229
|
+
opacity: 1,
|
|
230
|
+
// 透明度
|
|
231
|
+
zIndex: 0
|
|
232
|
+
// 叠加层级
|
|
233
|
+
});
|
|
234
|
+
i.value = new e.Map("zerov-amap-2d", {
|
|
235
|
+
rotateEnable: t.config.rotateEnable,
|
|
236
|
+
// 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
|
|
237
|
+
pitchEnable: t.config.pitchEnable,
|
|
238
|
+
// 是否开启地图倾斜交互 鼠标右键 + 鼠标上下移动或键盘Ctrl + 鼠标上下移动
|
|
239
|
+
zoomEnable: t.config.zoomEnable,
|
|
240
|
+
dragEnable: t.config.dragEnable,
|
|
241
|
+
zoom: t.config.zoom,
|
|
242
|
+
// 初始化地图层级
|
|
243
|
+
viewMode: "2D",
|
|
244
|
+
// 开启3D视图,默认为关闭
|
|
245
|
+
zooms: t.config.zooms,
|
|
246
|
+
// 地图显示的缩放级别范围
|
|
247
|
+
center: t.config.center,
|
|
248
|
+
// 初始地图中心经纬度
|
|
249
|
+
mapStyle: t.config.mapStyle,
|
|
250
|
+
features: t.config.features,
|
|
251
|
+
layers: [o]
|
|
252
|
+
}), l.value = new window.Loca.Container({
|
|
253
|
+
map: i.value
|
|
254
|
+
}), b.value = new p.value.Scale({
|
|
255
|
+
visible: t.config.plugin.scale.visible,
|
|
256
|
+
position: {
|
|
257
|
+
left: t.config.plugin.scale.position.left + "px",
|
|
258
|
+
bottom: t.config.plugin.scale.position.bottom + "px"
|
|
259
|
+
}
|
|
260
|
+
}), i.value.addControl(b.value), f.value = new e.ControlBar({
|
|
261
|
+
visible: t.config.plugin.controlBar.visible,
|
|
262
|
+
showControlButton: t.config.plugin.controlBar.showControlButton,
|
|
263
|
+
position: {
|
|
264
|
+
right: t.config.plugin.controlBar.position.right + "px",
|
|
265
|
+
top: t.config.plugin.controlBar.position.top + "px"
|
|
266
|
+
}
|
|
267
|
+
}), i.value.addControl(f.value), v.value = new e.ToolBar({
|
|
268
|
+
visible: t.config.plugin.toolBar.visible,
|
|
269
|
+
position: {
|
|
270
|
+
left: t.config.plugin.toolBar.position.left + "px",
|
|
271
|
+
top: t.config.plugin.toolBar.position.top + "px"
|
|
272
|
+
}
|
|
273
|
+
}), i.value.addControl(v.value), x(e), i.value.on("complete", () => {
|
|
274
|
+
setTimeout(() => {
|
|
275
|
+
C.value = !0, u("amap2d-scene-success"), d.parseEvents(a.useEvents, "amap2d-scene-success", null);
|
|
276
|
+
}, 666);
|
|
277
|
+
}), i.value.on("zoomstart", () => {
|
|
278
|
+
u("amap2d-scene-zoomstart"), d.parseEvents(a.useEvents, "amap2d-scene-zoomstart", null);
|
|
279
|
+
}), i.value.on("zoomend", () => {
|
|
280
|
+
u("amap2d-scene-zoomend"), d.parseEvents(a.useEvents, "amap2d-scene-zoomend", null);
|
|
281
|
+
}), i.value.on("click", (r) => {
|
|
282
|
+
u("amap2d-scene-mapclick", r.lnglat), d.parseEvents(a.useEvents, "amap2d-scene-mapclick", r.lnglat);
|
|
283
|
+
}), i.value.on("dragstart", (r) => {
|
|
284
|
+
u("amap2d-scene-dragstart", r.lnglat), d.parseEvents(a.useEvents, "amap2d-scene-dragstart", r.lnglat);
|
|
285
|
+
}), i.value.on("dragend", (r) => {
|
|
286
|
+
u("amap2d-scene-dragend", r.lnglat), d.parseEvents(a.useEvents, "amap2d-scene-dragend", r.lnglat);
|
|
287
|
+
});
|
|
288
|
+
}).catch((e) => {
|
|
289
|
+
});
|
|
290
|
+
}, x = (t) => {
|
|
291
|
+
a.sources && a.sources.length > 0 ? le.parse({
|
|
292
|
+
tId: a.uuid,
|
|
293
|
+
sources: a.sources,
|
|
294
|
+
callback: (o) => {
|
|
295
|
+
try {
|
|
296
|
+
const r = a.basicOption.widgets.find((s) => s._sourceId === o.id);
|
|
297
|
+
r && r.type === "heatmap" && G(t, r, o.data[0].data), r && r.type === "dotlayers" && H(window.Loca, r, z(o.data[0].data)), r && r.type === "scatter" && Z(window.Loca, r, z(o.data[0].data)), r && r.type === "labelsLayer" && j(window.Loca, r, z(o.data[0].data));
|
|
298
|
+
} catch {
|
|
299
|
+
}
|
|
300
|
+
a.basicOption.widgets.filter((r) => r.type === "boundary").forEach((r) => {
|
|
301
|
+
O(t, r);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}) : a.basicOption.widgets.filter((o) => o.type === "boundary").forEach((o) => {
|
|
305
|
+
O(t, o);
|
|
306
|
+
});
|
|
307
|
+
const e = i.value.getLayers();
|
|
308
|
+
for (let o = 0; o < e.length; o++)
|
|
309
|
+
(e[o].type === "sketchTileLayer" || e[o]._opts.type === "sketchImageLayer") && i.value.removeLayer(e[o]);
|
|
310
|
+
a.basicOption.widgets.filter((o) => o.type === "sketchTile").forEach((o) => {
|
|
311
|
+
const r = N(o);
|
|
312
|
+
r && i.value.addLayer(r);
|
|
313
|
+
}), a.basicOption.widgets.filter((o) => o.type === "sketchImage").forEach((o) => {
|
|
314
|
+
const r = F(o);
|
|
315
|
+
i.value.addLayer(r);
|
|
316
|
+
});
|
|
317
|
+
}, P = (t) => {
|
|
318
|
+
const o = t.slice(t.indexOf("(") + 1, t.lastIndexOf(")")).split(",").map((s) => s.trim()), r = {};
|
|
319
|
+
for (let s = 1; s < o.length; s++) {
|
|
320
|
+
const m = o[s].split(" "), n = m[0], h = parseFloat(m[1]) / 100, Q = Math.round(h * 100) / 100;
|
|
321
|
+
r[Q] = n;
|
|
322
|
+
}
|
|
323
|
+
return r;
|
|
324
|
+
}, N = (t) => {
|
|
325
|
+
try {
|
|
326
|
+
return new p.value.TileLayer({
|
|
327
|
+
bounds: new p.value.Bounds(
|
|
328
|
+
t.bounds[0],
|
|
329
|
+
t.bounds[1]
|
|
330
|
+
),
|
|
331
|
+
getTileUrl: function(o, r, s) {
|
|
332
|
+
try {
|
|
333
|
+
return t.url.replace("{z}", s).replace("{x}", o).replace("{y}", r);
|
|
334
|
+
} catch {
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
type: "sketchTileLayer",
|
|
338
|
+
tileSize: t.tileSize,
|
|
339
|
+
opacity: t.opacity,
|
|
340
|
+
zIndex: t.zIndex,
|
|
341
|
+
zooms: t.zooms
|
|
342
|
+
});
|
|
343
|
+
} catch {
|
|
344
|
+
}
|
|
345
|
+
return null;
|
|
346
|
+
}, F = (t) => {
|
|
347
|
+
try {
|
|
348
|
+
return new p.value.ImageLayer({
|
|
349
|
+
bounds: new p.value.Bounds(
|
|
350
|
+
t.bounds[0],
|
|
351
|
+
// 左下 手绘图左下相对于地图的经纬度
|
|
352
|
+
t.bounds[1]
|
|
353
|
+
// 右上 手绘图右上相对于地图的经纬度
|
|
354
|
+
),
|
|
355
|
+
type: "sketchImageLayer",
|
|
356
|
+
opacity: t.opacity,
|
|
357
|
+
url: t.url,
|
|
358
|
+
zIndex: t.zIndex,
|
|
359
|
+
zooms: t.zooms
|
|
360
|
+
// 设置可见级别,[最小级别,最大级别]
|
|
361
|
+
});
|
|
362
|
+
} catch {
|
|
363
|
+
}
|
|
364
|
+
return null;
|
|
365
|
+
}, G = (t, e, o) => {
|
|
366
|
+
try {
|
|
367
|
+
const r = new t.HeatMap(i.value, {
|
|
368
|
+
radius: e.radius,
|
|
369
|
+
// 给定半径
|
|
370
|
+
opacity: e.opacity,
|
|
371
|
+
gradient: P(e.gradient)
|
|
372
|
+
});
|
|
373
|
+
setTimeout(() => {
|
|
374
|
+
r.setDataSet({
|
|
375
|
+
data: o,
|
|
376
|
+
max: e.max
|
|
377
|
+
});
|
|
378
|
+
}, 0);
|
|
379
|
+
} catch {
|
|
380
|
+
}
|
|
381
|
+
}, O = async (t, e) => {
|
|
382
|
+
try {
|
|
383
|
+
const o = await ie.get(e.geojson);
|
|
384
|
+
if (o.status === 200) {
|
|
385
|
+
const r = new t.GeoJSON({
|
|
386
|
+
geoJSON: o.data,
|
|
387
|
+
getPolygon: function(s, m) {
|
|
388
|
+
const n = new t.Polygon({
|
|
389
|
+
path: m,
|
|
390
|
+
zIndex: e.zIndex,
|
|
391
|
+
fillColor: e.style.fillColor,
|
|
392
|
+
// 填充色
|
|
393
|
+
strokeOpacity: e.style.strokeOpacity,
|
|
394
|
+
// 轮廓线透明度
|
|
395
|
+
fillOpacity: e.style.fillOpacity,
|
|
396
|
+
// 填充色透明度
|
|
397
|
+
strokeColor: e.style.strokeColor,
|
|
398
|
+
// 线条颜色
|
|
399
|
+
strokeWeight: e.style.strokeWeight,
|
|
400
|
+
// 线条宽度
|
|
401
|
+
strokeStyle: e.style.strokeStyle
|
|
402
|
+
// 线条样式
|
|
403
|
+
});
|
|
404
|
+
return n.on("mouseover", () => {
|
|
405
|
+
n.setOptions({
|
|
406
|
+
fillOpacity: e.mouseover.fillOpacity,
|
|
407
|
+
fillColor: e.mouseover.fillColor,
|
|
408
|
+
strokeOpacity: e.mouseover.strokeOpacity,
|
|
409
|
+
strokeColor: e.mouseover.strokeColor,
|
|
410
|
+
strokeStyle: e.mouseover.strokeStyle,
|
|
411
|
+
strokeWeight: e.mouseover.strokeWeight
|
|
412
|
+
});
|
|
413
|
+
}), n.on("mouseout", () => {
|
|
414
|
+
n.setOptions({
|
|
415
|
+
fillColor: e.style.fillColor,
|
|
416
|
+
// 填充色
|
|
417
|
+
strokeOpacity: e.style.strokeOpacity,
|
|
418
|
+
// 轮廓线透明度
|
|
419
|
+
fillOpacity: e.style.fillOpacity,
|
|
420
|
+
// 填充色透明度
|
|
421
|
+
strokeColor: e.style.strokeColor,
|
|
422
|
+
// 线条颜色
|
|
423
|
+
strokeWeight: e.style.strokeWeight,
|
|
424
|
+
// 线条宽度
|
|
425
|
+
strokeStyle: e.style.strokeStyle
|
|
426
|
+
// 线条样式
|
|
427
|
+
});
|
|
428
|
+
}), n;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
i.value.add(r);
|
|
432
|
+
}
|
|
433
|
+
} catch {
|
|
434
|
+
}
|
|
435
|
+
}, H = (t, e, o) => {
|
|
436
|
+
try {
|
|
437
|
+
const r = new t.GeoJSONSource({
|
|
438
|
+
data: o
|
|
439
|
+
}), s = new t.PointLayer({
|
|
440
|
+
zIndex: e.zIndex,
|
|
441
|
+
blend: e.blend,
|
|
442
|
+
visible: e.visible,
|
|
443
|
+
opacity: e.opacity
|
|
444
|
+
}), m = {
|
|
445
|
+
radius: e.style.radius,
|
|
446
|
+
unit: e.style.unit,
|
|
447
|
+
color: e.style.color,
|
|
448
|
+
borderWidth: e.style.borderWidth,
|
|
449
|
+
blurWidth: e.style.blurWidth,
|
|
450
|
+
borderColor: e.style.borderColor
|
|
451
|
+
};
|
|
452
|
+
s.setSource(r), s.setStyle(m), l.value.add(s), s.addAnimate({
|
|
453
|
+
key: e.animate.key,
|
|
454
|
+
value: e.animate.value,
|
|
455
|
+
duration: e.animate.duration,
|
|
456
|
+
easing: e.animate.easing,
|
|
457
|
+
transform: e.animate.transform,
|
|
458
|
+
random: e.animate.random,
|
|
459
|
+
delay: e.animate.delay,
|
|
460
|
+
yoyo: e.animate.yoyo,
|
|
461
|
+
repeat: e.animate.repeat
|
|
462
|
+
});
|
|
463
|
+
} catch {
|
|
464
|
+
}
|
|
465
|
+
}, Z = (t, e, o) => {
|
|
466
|
+
try {
|
|
467
|
+
const r = new t.GeoJSONSource({
|
|
468
|
+
data: o
|
|
469
|
+
}), s = new t.ScatterLayer({
|
|
470
|
+
loca: l.value,
|
|
471
|
+
zIndex: e.zIndex,
|
|
472
|
+
opacity: e.opacity,
|
|
473
|
+
visible: e.visible,
|
|
474
|
+
zooms: e.zooms
|
|
475
|
+
});
|
|
476
|
+
s.setSource(r), s.setStyle({
|
|
477
|
+
unit: e.style.unit,
|
|
478
|
+
size: e.style.size,
|
|
479
|
+
borderWidth: e.style.borderWidth,
|
|
480
|
+
texture: e.style.texture,
|
|
481
|
+
duration: e.style.duration,
|
|
482
|
+
animate: e.style.animate
|
|
483
|
+
}), l.value.animate.start();
|
|
484
|
+
} catch {
|
|
485
|
+
}
|
|
486
|
+
}, j = (t, e, o) => {
|
|
487
|
+
try {
|
|
488
|
+
const r = new t.GeoJSONSource({
|
|
489
|
+
data: o
|
|
490
|
+
}), s = new t.LabelsLayer({
|
|
491
|
+
eventSupport: !0,
|
|
492
|
+
visible: e.visible,
|
|
493
|
+
zooms: e.zooms,
|
|
494
|
+
opacity: e.opacity,
|
|
495
|
+
collision: e.collision,
|
|
496
|
+
allowCollision: e.allowCollision,
|
|
497
|
+
zIndex: e.zIndex
|
|
498
|
+
});
|
|
499
|
+
s.setSource(r), s.setStyle({
|
|
500
|
+
icon: {
|
|
501
|
+
image: e.icon.image,
|
|
502
|
+
size: e.icon.size,
|
|
503
|
+
clipOrigin: e.icon.clipOrigin,
|
|
504
|
+
offset: e.icon.offset,
|
|
505
|
+
anchor: e.icon.anchor
|
|
506
|
+
},
|
|
507
|
+
text: {
|
|
508
|
+
// 每项配置都可使用回调函数来动态配置
|
|
509
|
+
content: (m, n) => n.properties[e.text.content],
|
|
510
|
+
zooms: e.text.zooms,
|
|
511
|
+
offset: e.text.offset,
|
|
512
|
+
direction: e.text.direction,
|
|
513
|
+
style: {
|
|
514
|
+
fontSize: e.text.style.fontSize,
|
|
515
|
+
fillColor: e.text.style.fillColor,
|
|
516
|
+
strokeColor: e.text.style.strokeColor,
|
|
517
|
+
strokeWidth: e.text.style.strokeWidth,
|
|
518
|
+
padding: e.text.style.padding,
|
|
519
|
+
backgroundColor: e.text.style.backgroundColor,
|
|
520
|
+
borderColor: e.text.style.borderColor,
|
|
521
|
+
borderWidth: e.text.style.borderWidth,
|
|
522
|
+
fold: e.text.style.fold,
|
|
523
|
+
fontWeight: e.text.style.fontWeight
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}), s.on("complete", () => {
|
|
527
|
+
const m = s.getLabelsLayer().getAllOverlays();
|
|
528
|
+
for (const n of m)
|
|
529
|
+
n.on("click", (h) => {
|
|
530
|
+
}), n.on("mouseover", (h) => {
|
|
531
|
+
}), n.on("mouseout", (h) => {
|
|
532
|
+
});
|
|
533
|
+
}), l.value.add(s);
|
|
534
|
+
} catch {
|
|
535
|
+
}
|
|
536
|
+
}, z = (t) => {
|
|
537
|
+
const e = {
|
|
538
|
+
type: "FeatureCollection",
|
|
539
|
+
features: []
|
|
540
|
+
};
|
|
541
|
+
return t.forEach((o, r) => {
|
|
542
|
+
const s = {
|
|
543
|
+
type: "Feature",
|
|
544
|
+
id: se(),
|
|
545
|
+
properties: {
|
|
546
|
+
name: o.name || "",
|
|
547
|
+
_draw_type: "point"
|
|
548
|
+
},
|
|
549
|
+
geometry: {
|
|
550
|
+
type: "Point",
|
|
551
|
+
coordinates: o.value
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
e.features.push(s);
|
|
555
|
+
}), e;
|
|
556
|
+
}, R = (t) => {
|
|
557
|
+
i.value.setFeatures(t.config.features), i.value.setStatus({
|
|
558
|
+
dragEnable: t.config.dragEnable,
|
|
559
|
+
zoomEnable: t.config.zoomEnable,
|
|
560
|
+
rotateEnable: t.config.rotateEnable
|
|
561
|
+
}), t.config.plugin.scale.visible ? b.value.show() : b.value.hide(), t.config.plugin.toolBar.visible ? v.value.show() : v.value.hide(), t.config.plugin.controlBar.visible ? f.value.show() : f.value.hide();
|
|
562
|
+
}, V = () => {
|
|
563
|
+
i.value.clearMap(), l.value.clear(), x(p.value);
|
|
564
|
+
}, U = (t) => {
|
|
565
|
+
i.value.setMapStyle(t.config.mapStyle);
|
|
566
|
+
}, q = (t) => {
|
|
567
|
+
i.value.setZoom(t.config.zoom, !1, 200);
|
|
568
|
+
}, K = (t) => {
|
|
569
|
+
i.value.setCenter(t.config.center, !1, 200);
|
|
570
|
+
}, S = () => {
|
|
571
|
+
i.value && (i.value.clearMap(), i.value.destroy(), i.value = null, l.value && (l.value.clear(), l.value.destroy(), l.value = null));
|
|
572
|
+
};
|
|
573
|
+
return re(() => {
|
|
574
|
+
setTimeout(() => {
|
|
575
|
+
w(a.basicOption);
|
|
576
|
+
}, 0);
|
|
577
|
+
}), oe(() => S()), {
|
|
578
|
+
initAMap2d: w,
|
|
579
|
+
updateAMapStyle: U,
|
|
580
|
+
updateAMapConfig: R,
|
|
581
|
+
updateAMapComponents: V,
|
|
582
|
+
updateAMapZoom: q,
|
|
583
|
+
updateAMapCenter: K,
|
|
584
|
+
amap2d: i,
|
|
585
|
+
loading: C,
|
|
586
|
+
AMapPrototype: p
|
|
587
|
+
};
|
|
588
|
+
}, {
|
|
589
|
+
initAMap2d: g,
|
|
590
|
+
updateAMapStyle: W,
|
|
591
|
+
updateAMapConfig: k,
|
|
592
|
+
updateAMapComponents: D,
|
|
593
|
+
updateAMapZoom: T,
|
|
594
|
+
updateAMapCenter: _,
|
|
595
|
+
loading: J
|
|
596
|
+
} = B();
|
|
597
|
+
return c(() => a.basicOption.config, () => {
|
|
598
|
+
k(a.basicOption);
|
|
599
|
+
}, { deep: !0 }), c(() => a.basicOption.config.zoom, () => {
|
|
600
|
+
T(a.basicOption);
|
|
601
|
+
}, { deep: !0 }), c(() => a.basicOption.config.center, () => {
|
|
602
|
+
_(a.basicOption);
|
|
603
|
+
}, { deep: !0 }), c(() => a.basicOption.widgets, () => {
|
|
604
|
+
D();
|
|
605
|
+
}, { deep: !0 }), c(() => a.basicOption.config.mapStyle, () => {
|
|
606
|
+
W(a.basicOption);
|
|
607
|
+
}, { deep: !0 }), c(() => a.basicOption.basic, () => {
|
|
608
|
+
g(a.basicOption);
|
|
609
|
+
}, { deep: !0 }), c(() => a.sources, () => {
|
|
610
|
+
g(a.basicOption);
|
|
611
|
+
}, { deep: !0 }), A({
|
|
612
|
+
refresh: () => g(a.basicOption),
|
|
613
|
+
refreshView: () => k(a.basicOption),
|
|
614
|
+
refreshData: () => g(a.basicOption)
|
|
615
|
+
}), (i, l) => (Y(), X("div", {
|
|
616
|
+
class: $(["amap-2d-wrap", { show: ee(J) }])
|
|
617
|
+
}, l[0] || (l[0] = [
|
|
618
|
+
te("div", {
|
|
619
|
+
id: "zerov-amap-2d",
|
|
620
|
+
class: "zerov-amap-container"
|
|
621
|
+
}, null, -1)
|
|
622
|
+
]), 2));
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
export {
|
|
626
|
+
Po as default
|
|
627
|
+
};
|