Commit d187adae64d9f14f38b6d7647f19cbda07a65a29
1 parent
ef6e0e9c
feat(src/packages): 图表里的地图 新增3d地图,支持凸起和标点
Showing
7 changed files
with
275 additions
and
1301 deletions
Too many changes to show.
To preserve performance only 7 of 8 files are displayed.
src/assets/images/chart/charts/map3D.png
0 → 100644
100 KB
@@ -3,7 +3,7 @@ import { AddThreeDimensionalMapConfig } from './index' | @@ -3,7 +3,7 @@ import { AddThreeDimensionalMapConfig } from './index' | ||
3 | import { chartInitConfig } from '@/settings/designSetting' | 3 | import { chartInitConfig } from '@/settings/designSetting' |
4 | import { CreateComponentType } from '@/packages/index.d' | 4 | import { CreateComponentType } from '@/packages/index.d' |
5 | import cloneDeep from 'lodash/cloneDeep' | 5 | import cloneDeep from 'lodash/cloneDeep' |
6 | -import { dataMaps } from './mock' | 6 | +import dataMaps from './data.json' |
7 | 7 | ||
8 | //省市区枚举 | 8 | //省市区枚举 |
9 | export const enum areaEnum { | 9 | export const enum areaEnum { |
@@ -20,6 +20,7 @@ export const option = { | @@ -20,6 +20,7 @@ export const option = { | ||
20 | iconDistanceRight: 20, | 20 | iconDistanceRight: 20, |
21 | iconDistanceTop: 20, | 21 | iconDistanceTop: 20, |
22 | drillingIn: false, | 22 | drillingIn: false, |
23 | + dataset: dataMaps, | ||
23 | mapRegion: { | 24 | mapRegion: { |
24 | adcode: 'china', | 25 | adcode: 'china', |
25 | showHainanIsLands: true, | 26 | showHainanIsLands: true, |
@@ -34,27 +35,52 @@ export const option = { | @@ -34,27 +35,52 @@ export const option = { | ||
34 | regionHeight: 0, | 35 | regionHeight: 0, |
35 | label: { | 36 | label: { |
36 | show: true, | 37 | show: true, |
37 | - distance: 0, | ||
38 | - color: 'rgba(255,255,255,1)', // 地图初始化区域字体颜色 | ||
39 | - fontSize: 12, | ||
40 | - opacity: 1, | ||
41 | - backgroundColor: 'rgba(255,255,255,0)', | ||
42 | - shadowColor: '#043157', // 地图模糊颜色 | ||
43 | - shadowBlur: '3', | ||
44 | - borderRadius: 0, | ||
45 | - distanca: 0 | 38 | + textStyle: { |
39 | + fontSize: 14, | ||
40 | + color: 'blue', | ||
41 | + borderWidth: 0, | ||
42 | + borderColor: '#000' | ||
43 | + } | ||
44 | + }, | ||
45 | + emphasis: { | ||
46 | + label: { | ||
47 | + show: true, | ||
48 | + textStyle: { | ||
49 | + color: 'black', | ||
50 | + fontSize: 32 | ||
51 | + } | ||
52 | + }, | ||
53 | + itemStyle: { | ||
54 | + color: '#fd9c5a' | ||
55 | + } | ||
46 | } | 56 | } |
47 | }, | 57 | }, |
48 | series: [ | 58 | series: [ |
49 | { | 59 | { |
50 | type: 'map3D', | 60 | type: 'map3D', |
51 | map: 'centerMap', | 61 | map: 'centerMap', |
62 | + name: 'centerMap', | ||
63 | + regionHeight: 3, | ||
64 | + label: { | ||
65 | + show: true, | ||
66 | + color: 'yellow', | ||
67 | + fontSize: 14 | ||
68 | + }, | ||
52 | itemStyle: { | 69 | itemStyle: { |
53 | - color: 'red', | 70 | + color: 'green', |
54 | borderWidth: 0.8, | 71 | borderWidth: 0.8, |
55 | - borderColor: 'green' | 72 | + borderColor: 'blue' |
56 | }, | 73 | }, |
57 | data: [] | 74 | data: [] |
75 | + }, | ||
76 | + { | ||
77 | + name: 'scatter3D', | ||
78 | + type: 'scatter3D', | ||
79 | + coordinateSystem: 'geo3D', | ||
80 | + symbol: 'circle', | ||
81 | + symbolSize: 20, | ||
82 | + animation: true, | ||
83 | + data: dataMaps | ||
58 | } | 84 | } |
59 | ] | 85 | ] |
60 | } | 86 | } |
@@ -55,8 +55,16 @@ | @@ -55,8 +55,16 @@ | ||
55 | placeholder="请输入" | 55 | placeholder="请输入" |
56 | ></n-input-number> | 56 | ></n-input-number> |
57 | </SettingItem> | 57 | </SettingItem> |
58 | + <SettingItem name="厚度"> | ||
59 | + <n-input-number | ||
60 | + v-model:value="seriesList[0].regionHeight" | ||
61 | + :min="0" | ||
62 | + size="small" | ||
63 | + placeholder="请输入" | ||
64 | + ></n-input-number> | ||
65 | + </SettingItem> | ||
58 | </SettingItemBox> | 66 | </SettingItemBox> |
59 | - <!-- <SettingItemBox name="标题"> | 67 | + <SettingItemBox name="标题"> |
60 | <SettingItem name="是否显示"> | 68 | <SettingItem name="是否显示"> |
61 | <n-switch v-model:value="seriesList[0].label.show" size="small"></n-switch> | 69 | <n-switch v-model:value="seriesList[0].label.show" size="small"></n-switch> |
62 | </SettingItem> | 70 | </SettingItem> |
@@ -71,12 +79,53 @@ | @@ -71,12 +79,53 @@ | ||
71 | placeholder="请输入" | 79 | placeholder="请输入" |
72 | ></n-input-number> | 80 | ></n-input-number> |
73 | </SettingItem> | 81 | </SettingItem> |
74 | - </SettingItemBox> --> | 82 | + </SettingItemBox> |
83 | + <SettingItemBox name="高亮"> | ||
84 | + <SettingItem name="标题显示"> | ||
85 | + <n-switch v-model:value="optionData.geo3D.emphasis.label.show" size="small"></n-switch> | ||
86 | + </SettingItem> | ||
87 | + <SettingItem name="颜色"> | ||
88 | + <n-color-picker | ||
89 | + size="small" | ||
90 | + :modes="['hex']" | ||
91 | + v-model:value="optionData.geo3D.emphasis.label.textStyle.color" | ||
92 | + ></n-color-picker> | ||
93 | + </SettingItem> | ||
94 | + <SettingItem name="大小"> | ||
95 | + <n-input-number | ||
96 | + v-model:value="optionData.geo3D.emphasis.label.textStyle.fontSize" | ||
97 | + :min="0" | ||
98 | + size="small" | ||
99 | + placeholder="请输入" | ||
100 | + ></n-input-number> | ||
101 | + </SettingItem> | ||
102 | + <SettingItem name="区块颜色"> | ||
103 | + <n-color-picker | ||
104 | + size="small" | ||
105 | + :modes="['hex']" | ||
106 | + v-model:value="optionData.geo3D.emphasis.itemStyle.color" | ||
107 | + ></n-color-picker> | ||
108 | + </SettingItem> | ||
109 | + </SettingItemBox> | ||
110 | + <SettingItemBox name="标记"> | ||
111 | + <SettingItem name="大小"> | ||
112 | + <n-input-number | ||
113 | + v-model:value="seriesList[1].symbolSize" | ||
114 | + :min="0" | ||
115 | + :step="10" | ||
116 | + size="small" | ||
117 | + placeholder="请输入" | ||
118 | + ></n-input-number> | ||
119 | + </SettingItem> | ||
120 | + <SettingItem name="形状"> | ||
121 | + <n-select :options="symbolOption" v-model:value="seriesList[1].symbol"></n-select> | ||
122 | + </SettingItem> | ||
123 | + </SettingItemBox> | ||
75 | </CollapseItem> | 124 | </CollapseItem> |
76 | </template> | 125 | </template> |
77 | 126 | ||
78 | <script setup lang="ts"> | 127 | <script setup lang="ts"> |
79 | -import { PropType, computed } from 'vue' | 128 | +import { PropType, computed, ref } from 'vue' |
80 | import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting' | 129 | import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting' |
81 | import { GlobalThemeJsonType } from '@/settings/chartThemes/index' | 130 | import { GlobalThemeJsonType } from '@/settings/chartThemes/index' |
82 | import { GlobalSetting } from '@/components/Pages/ChartItemSetting' | 131 | import { GlobalSetting } from '@/components/Pages/ChartItemSetting' |
@@ -93,6 +142,41 @@ const seriesList = computed(() => { | @@ -93,6 +142,41 @@ const seriesList = computed(() => { | ||
93 | return props.optionData.series | 142 | return props.optionData.series |
94 | }) | 143 | }) |
95 | 144 | ||
145 | +const symbolOption = ref([ | ||
146 | + { | ||
147 | + label: 'circle', | ||
148 | + value: 'circle' | ||
149 | + }, | ||
150 | + { | ||
151 | + label: 'rect', | ||
152 | + value: 'rect' | ||
153 | + }, | ||
154 | + { | ||
155 | + label: 'roundRect', | ||
156 | + value: 'roundRect' | ||
157 | + }, | ||
158 | + { | ||
159 | + label: 'triangle', | ||
160 | + value: 'triangle' | ||
161 | + }, | ||
162 | + { | ||
163 | + label: 'diamond', | ||
164 | + value: 'diamond' | ||
165 | + }, | ||
166 | + { | ||
167 | + label: 'pin', | ||
168 | + value: 'pin' | ||
169 | + }, | ||
170 | + { | ||
171 | + label: 'arrow', | ||
172 | + value: 'arrow' | ||
173 | + }, | ||
174 | + { | ||
175 | + label: 'none', | ||
176 | + value: 'none' | ||
177 | + } | ||
178 | +]) | ||
179 | + | ||
96 | const onHandleSelectValues = (values: any) => { | 180 | const onHandleSelectValues = (values: any) => { |
97 | const { cityValue, countyValue, provinceValue } = values | 181 | const { cityValue, countyValue, provinceValue } = values |
98 | props.optionData.mapRegion.saveSelect = values | 182 | props.optionData.mapRegion.saveSelect = values |
1 | -{ | ||
2 | - "type": "FeatureCollection", | ||
3 | - "features": [ | ||
4 | - { | ||
5 | - "type": "Feature", | ||
6 | - "properties": { "name": "成华区" }, | ||
7 | - "geometry": { | ||
8 | - "type": "MultiPolygon", | ||
9 | - "coordinates": [ | ||
10 | - [ | ||
11 | - [ | ||
12 | - [104.153985625, 30.740483625], | ||
13 | - [104.161353789063, 30.7259181953125], | ||
14 | - [104.172735625, 30.7314748359376], | ||
15 | - [104.190704375, 30.717202375], | ||
16 | - [104.219771757813, 30.708813703125], | ||
17 | - [104.227345, 30.693843], | ||
18 | - [104.223260527344, 30.6879274726563], | ||
19 | - [104.161903105469, 30.6721804023438], | ||
20 | - [104.153260527344, 30.6279274726563], | ||
21 | - [104.137345, 30.623843], | ||
22 | - [104.09170046875, 30.65819846875], | ||
23 | - [104.087345, 30.663843], | ||
24 | - [104.087345, 30.6738430000001], | ||
25 | - [104.083260527344, 30.6997585273438], | ||
26 | - [104.070081816406, 30.7088576484376], | ||
27 | - [104.137345, 30.753843], | ||
28 | - [104.140704375, 30.747202375], | ||
29 | - [104.153985625, 30.740483625] | ||
30 | - ] | ||
31 | - ] | ||
32 | - ] | ||
33 | - } | ||
34 | - }, | ||
35 | - { | ||
36 | - "type": "Feature", | ||
37 | - "properties": { "name": "崇州市" }, | ||
38 | - "geometry": { | ||
39 | - "type": "MultiPolygon", | ||
40 | - "coordinates": [ | ||
41 | - [ | ||
42 | - [ | ||
43 | - [103.637345, 30.523843], | ||
44 | - [103.633922148438, 30.5116506171875], | ||
45 | - [103.625152617188, 30.5204201484375], | ||
46 | - [103.637345, 30.523843] | ||
47 | - ] | ||
48 | - ], | ||
49 | - [ | ||
50 | - [ | ||
51 | - [103.637345, 30.523843], | ||
52 | - [103.623880644531, 30.5412868476563], | ||
53 | - [103.559073515625, 30.5317092109375], | ||
54 | - [103.563084746094, 30.5588430000001], | ||
55 | - [103.560128203125, 30.578843], | ||
56 | - [103.5652746875, 30.6136721015626], | ||
57 | - [103.55170046875, 30.6481984687501], | ||
58 | - [103.541370878906, 30.685298078125], | ||
59 | - [103.501053496094, 30.7164186835938], | ||
60 | - [103.409039335938, 30.7320485664063], | ||
61 | - [103.381954375, 30.7280471015626], | ||
62 | - [103.362279082031, 30.7399147773438], | ||
63 | - [103.332410917969, 30.7177712226563], | ||
64 | - [103.312345, 30.7298757148438], | ||
65 | - [103.292735625, 30.7180471015626], | ||
66 | - [103.282345, 30.7195827460938], | ||
67 | - [103.271832304688, 30.7180275703125], | ||
68 | - [103.236873808594, 30.7633205390626], | ||
69 | - [103.2027746875, 30.7380397773438], | ||
70 | - [103.183924589844, 30.740825421875], | ||
71 | - [103.135914335938, 30.7697878242188], | ||
72 | - [103.117345, 30.793843], | ||
73 | - [103.128631621094, 30.8025563789063], | ||
74 | - [103.14170046875, 30.81948753125], | ||
75 | - [103.15298953125, 30.82819846875], | ||
76 | - [103.16978640625, 30.8499611640625], | ||
77 | - [103.182345, 30.8481032539063], | ||
78 | - [103.192996855469, 30.8496779609375], | ||
79 | - [103.278631621094, 30.8351296210938], | ||
80 | - [103.298426542969, 30.8094875312501], | ||
81 | - [103.33298953125, 30.82819846875], | ||
82 | - [103.353150664063, 30.8543215156251], | ||
83 | - [103.40298953125, 30.8681984687501], | ||
84 | - [103.427345, 30.883843], | ||
85 | - [103.437838164063, 30.8702468085938], | ||
86 | - [103.452345, 30.8681032539062], | ||
87 | - [103.462735625, 30.8696388984375], | ||
88 | - [103.495345488281, 30.8499684882812], | ||
89 | - [103.53298953125, 30.83948753125], | ||
90 | - [103.54170046875, 30.82819846875], | ||
91 | - [103.59298953125, 30.8139162421875], | ||
92 | - [103.612916289063, 30.7652321601563], | ||
93 | - [103.696712675781, 30.7776174140625], | ||
94 | - [103.71170046875, 30.7581984687501], | ||
95 | - [103.727345, 30.753843], | ||
96 | - [103.731429472656, 30.7379274726563], | ||
97 | - [103.743260527344, 30.7197585273438], | ||
98 | - [103.751429472656, 30.6979274726563], | ||
99 | - [103.763565703125, 30.6792897773438], | ||
100 | - [103.760943632813, 30.6675954414063], | ||
101 | - [103.785513945313, 30.6320119453125], | ||
102 | - [103.797345, 30.623843], | ||
103 | - [103.801158476563, 30.5976564765625], | ||
104 | - [103.820518828125, 30.5700807929688], | ||
105 | - [103.810721464844, 30.5386305976563], | ||
106 | - [103.817345, 30.523843], | ||
107 | - [103.784957304688, 30.5209596992188], | ||
108 | - [103.799732695313, 30.5067263007813], | ||
109 | - [103.767345, 30.503843], | ||
110 | - [103.74298953125, 30.5394875312501], | ||
111 | - [103.716143828125, 30.5681984687501], | ||
112 | - [103.682735625, 30.5480471015625], | ||
113 | - [103.671912871094, 30.5496462226563], | ||
114 | - [103.637345, 30.523843] | ||
115 | - ] | ||
116 | - ] | ||
117 | - ] | ||
118 | - } | ||
119 | - }, | ||
120 | - { | ||
121 | - "type": "Feature", | ||
122 | - "properties": { "name": "大邑县" }, | ||
123 | - "geometry": { | ||
124 | - "type": "MultiPolygon", | ||
125 | - "coordinates": [ | ||
126 | - [ | ||
127 | - [ | ||
128 | - [103.637345, 30.523843], | ||
129 | - [103.625152617188, 30.5204201484375], | ||
130 | - [103.633922148438, 30.5116506171875], | ||
131 | - [103.671912871094, 30.5496462226563], | ||
132 | - [103.682735625, 30.5480471015625], | ||
133 | - [103.716143828125, 30.5681984687501], | ||
134 | - [103.74298953125, 30.5394875312501], | ||
135 | - [103.767345, 30.503843], | ||
136 | - [103.743990507813, 30.4983425117188], | ||
137 | - [103.730220976563, 30.4579372382812], | ||
138 | - [103.707345, 30.4438430000001], | ||
139 | - [103.646654082031, 30.4724758125001], | ||
140 | - [103.62045046875, 30.4566677070313], | ||
141 | - [103.623175078125, 30.4382228828125], | ||
142 | - [103.55158328125, 30.4294875312501], | ||
143 | - [103.51298953125, 30.47948753125], | ||
144 | - [103.459075957031, 30.4886452460938], | ||
145 | - [103.437913847656, 30.5160622382813], | ||
146 | - [103.388421660156, 30.5504787421876], | ||
147 | - [103.367345, 30.5473659492188], | ||
148 | - [103.347345, 30.5503200507813], | ||
149 | - [103.303482695313, 30.5438381171875], | ||
150 | - [103.292916289063, 30.5180202460938], | ||
151 | - [103.272857695313, 30.5209841132813], | ||
152 | - [103.260809355469, 30.505376203125], | ||
153 | - [103.232345, 30.5095827460938], | ||
154 | - [103.221954375, 30.5080471015625], | ||
155 | - [103.20298953125, 30.51948753125], | ||
156 | - [103.177345, 30.523843], | ||
157 | - [103.156800566406, 30.5291139960938], | ||
158 | - [103.164818144531, 30.5648757148438], | ||
159 | - [103.125250273438, 30.5921950507813], | ||
160 | - [103.133465605469, 30.6288430000001], | ||
161 | - [103.126314726563, 30.660747296875], | ||
162 | - [103.089598417969, 30.6860964179688], | ||
163 | - [103.07033328125, 30.7139968085937], | ||
164 | - [103.032345, 30.7054811835937], | ||
165 | - [103.023260527344, 30.7297585273438], | ||
166 | - [103.001429472656, 30.7579274726563], | ||
167 | - [102.987345, 30.7838430000001], | ||
168 | - [103.00298953125, 30.78819846875], | ||
169 | - [103.073162871094, 30.815786359375], | ||
170 | - [103.11298953125, 30.79948753125], | ||
171 | - [103.117345, 30.793843], | ||
172 | - [103.135914335938, 30.7697878242188], | ||
173 | - [103.183924589844, 30.740825421875], | ||
174 | - [103.2027746875, 30.7380397773438], | ||
175 | - [103.236873808594, 30.7633205390626], | ||
176 | - [103.271832304688, 30.7180275703125], | ||
177 | - [103.282345, 30.7195827460938], | ||
178 | - [103.292735625, 30.7180471015626], | ||
179 | - [103.312345, 30.7298757148438], | ||
180 | - [103.332410917969, 30.7177712226563], | ||
181 | - [103.362279082031, 30.7399147773438], | ||
182 | - [103.381954375, 30.7280471015626], | ||
183 | - [103.409039335938, 30.7320485664063], | ||
184 | - [103.501053496094, 30.7164186835938], | ||
185 | - [103.541370878906, 30.685298078125], | ||
186 | - [103.55170046875, 30.6481984687501], | ||
187 | - [103.5652746875, 30.6136721015626], | ||
188 | - [103.560128203125, 30.578843], | ||
189 | - [103.563084746094, 30.5588430000001], | ||
190 | - [103.559073515625, 30.5317092109375], | ||
191 | - [103.623880644531, 30.5412868476563], | ||
192 | - [103.637345, 30.523843] | ||
193 | - ] | ||
194 | - ] | ||
195 | - ] | ||
196 | - } | ||
197 | - }, | ||
198 | - { | ||
199 | - "type": "Feature", | ||
200 | - "properties": { "name": "都江堰市" }, | ||
201 | - "geometry": { | ||
202 | - "type": "MultiPolygon", | ||
203 | - "coordinates": [ | ||
204 | - [ | ||
205 | - [ | ||
206 | - [103.695362578125, 31.3499343085938], | ||
207 | - [103.71744265625, 31.2742067695313], | ||
208 | - [103.677205839844, 31.2199343085937], | ||
209 | - [103.706058378906, 31.1825563789063], | ||
210 | - [103.732178984375, 31.1623928046875], | ||
211 | - [103.74170046875, 31.12819846875], | ||
212 | - [103.770584746094, 31.0803151679688], | ||
213 | - [103.729268828125, 31.0688088203125], | ||
214 | - [103.753140898438, 31.029233625], | ||
215 | - [103.751549101563, 31.0184523750001], | ||
216 | - [103.771219511719, 30.9858425117188], | ||
217 | - [103.777345, 30.963843], | ||
218 | - [103.771429472656, 30.9597585273438], | ||
219 | - [103.763260527344, 30.9279274726563], | ||
220 | - [103.751160917969, 30.8991213203126], | ||
221 | - [103.753616972656, 30.8881667304688], | ||
222 | - [103.717345, 30.8638430000001], | ||
223 | - [103.683756132813, 30.8852126289063], | ||
224 | - [103.712899199219, 30.8093971992188], | ||
225 | - [103.721790800781, 30.7682888007813], | ||
226 | - [103.727345, 30.753843], | ||
227 | - [103.71170046875, 30.7581984687501], | ||
228 | - [103.696712675781, 30.7776174140625], | ||
229 | - [103.612916289063, 30.7652321601563], | ||
230 | - [103.59298953125, 30.8139162421875], | ||
231 | - [103.54170046875, 30.82819846875], | ||
232 | - [103.53298953125, 30.83948753125], | ||
233 | - [103.495345488281, 30.8499684882812], | ||
234 | - [103.462735625, 30.8696388984375], | ||
235 | - [103.452345, 30.8681032539062], | ||
236 | - [103.437838164063, 30.8702468085938], | ||
237 | - [103.427345, 30.883843], | ||
238 | - [103.44298953125, 30.88819846875], | ||
239 | - [103.457257109375, 30.9394435859376], | ||
240 | - [103.519862089844, 30.9829787421875], | ||
241 | - [103.509969511719, 31.0499221015625], | ||
242 | - [103.534862089844, 31.1181471992188], | ||
243 | - [103.55298953125, 31.14819846875], | ||
244 | - [103.56170046875, 31.16948753125], | ||
245 | - [103.581451445313, 31.2022267890625], | ||
246 | - [103.570867949219, 31.273843], | ||
247 | - [103.573822050781, 31.293843], | ||
248 | - [103.566370878906, 31.3442653632812], | ||
249 | - [103.607345, 31.3503200507813], | ||
250 | - [103.622486601563, 31.3480837226563], | ||
251 | - [103.67170046875, 31.35948753125], | ||
252 | - [103.677345, 31.363843], | ||
253 | - [103.695362578125, 31.3499343085938] | ||
254 | - ] | ||
255 | - ] | ||
256 | - ] | ||
257 | - } | ||
258 | - }, | ||
259 | - { | ||
260 | - "type": "Feature", | ||
261 | - "properties": { "name": "金牛区" }, | ||
262 | - "geometry": { | ||
263 | - "type": "MultiPolygon", | ||
264 | - "coordinates": [ | ||
265 | - [ | ||
266 | - [ | ||
267 | - [104.123385039063, 30.7840578437501], | ||
268 | - [104.121795683594, 30.768452375], | ||
269 | - [104.132806425781, 30.7593044257813], | ||
270 | - [104.137345, 30.753843], | ||
271 | - [104.070081816406, 30.7088576484376], | ||
272 | - [104.083260527344, 30.6997585273438], | ||
273 | - [104.087345, 30.6738430000001], | ||
274 | - [104.061929960938, 30.6800856757813], | ||
275 | - [104.042345, 30.6673317695313], | ||
276 | - [104.023260527344, 30.6797585273438], | ||
277 | - [104.001051054688, 30.6880690742188], | ||
278 | - [104.004320097656, 30.7026491523438], | ||
279 | - [103.976312285156, 30.6963698554688], | ||
280 | - [103.957345, 30.723843], | ||
281 | - [103.959888945313, 30.7312990546876], | ||
282 | - [103.994801054688, 30.7363869453125], | ||
283 | - [104.000716582031, 30.7653542304688], | ||
284 | - [104.0341809375, 30.73212425], | ||
285 | - [104.037345, 30.753843], | ||
286 | - [104.06531375, 30.7476174140625], | ||
287 | - [104.093704863281, 30.7505104804688], | ||
288 | - [104.091685820313, 30.7703054023438], | ||
289 | - [104.065233183594, 30.7676076484375], | ||
290 | - [104.058656035156, 30.8083815742188], | ||
291 | - [104.123385039063, 30.7840578437501] | ||
292 | - ] | ||
293 | - ] | ||
294 | - ] | ||
295 | - } | ||
296 | - }, | ||
297 | - { | ||
298 | - "type": "Feature", | ||
299 | - "properties": { "name": "金堂县" }, | ||
300 | - "geometry": { | ||
301 | - "type": "MultiPolygon", | ||
302 | - "coordinates": [ | ||
303 | - [ | ||
304 | - [ | ||
305 | - [104.437345, 30.653843], | ||
306 | - [104.433292265625, 30.630844953125], | ||
307 | - [104.424647246094, 30.6484084296876], | ||
308 | - [104.437345, 30.653843] | ||
309 | - ] | ||
310 | - ], | ||
311 | - [ | ||
312 | - [ | ||
313 | - [104.457345, 30.663843], | ||
314 | - [104.447345, 30.663843], | ||
315 | - [104.447345, 30.653843], | ||
316 | - [104.437345, 30.653843], | ||
317 | - [104.437345, 30.6738430000001], | ||
318 | - [104.457345, 30.6738430000001], | ||
319 | - [104.457345, 30.663843] | ||
320 | - ] | ||
321 | - ], | ||
322 | - [ | ||
323 | - [ | ||
324 | - [104.357345, 30.843843], | ||
325 | - [104.353922148438, 30.8316506171875], | ||
326 | - [104.345152617188, 30.8404201484376], | ||
327 | - [104.357345, 30.843843] | ||
328 | - ] | ||
329 | - ], | ||
330 | - [ | ||
331 | - [ | ||
332 | - [104.367345, 30.843843], | ||
333 | - [104.357345, 30.843843], | ||
334 | - [104.362345, 30.8566506171875], | ||
335 | - [104.367345, 30.843843] | ||
336 | - ] | ||
337 | - ], | ||
338 | - [ | ||
339 | - [ | ||
340 | - [104.447345, 30.653843], | ||
341 | - [104.457345, 30.653843], | ||
342 | - [104.457345, 30.663843], | ||
343 | - [104.47298953125, 30.66819846875], | ||
344 | - [104.48170046875, 30.67948753125], | ||
345 | - [104.493822050781, 30.688843], | ||
346 | - [104.481529570313, 30.6983303046876], | ||
347 | - [104.483140898438, 30.7092336250001], | ||
348 | - [104.471549101563, 30.728452375], | ||
349 | - [104.475301542969, 30.753843], | ||
350 | - [104.471302519531, 30.7809059882813], | ||
351 | - [104.452345, 30.7781032539063], | ||
352 | - [104.442345, 30.7795827460938], | ||
353 | - [104.431832304688, 30.7780275703126], | ||
354 | - [104.422857695313, 30.7896584296876], | ||
355 | - [104.377684355469, 30.7829811835938], | ||
356 | - [104.367345, 30.843843], | ||
357 | - [104.373531523438, 30.8476564765625], | ||
358 | - [104.384456816406, 30.8797145820313], | ||
359 | - [104.356300078125, 30.8893117500001], | ||
360 | - [104.347345, 30.9038430000001], | ||
361 | - [104.369691191406, 30.9437599921875], | ||
362 | - [104.382345, 30.9273659492188], | ||
363 | - [104.392689238281, 30.940766828125], | ||
364 | - [104.458592558594, 30.9505055976563], | ||
365 | - [104.487345, 30.9438430000001], | ||
366 | - [104.525235625, 30.9222096992188], | ||
367 | - [104.521790800781, 30.8884133125], | ||
368 | - [104.607623320313, 30.8575759101563], | ||
369 | - [104.69373171875, 30.82022971875], | ||
370 | - [104.711922636719, 30.7782912421876], | ||
371 | - [104.728192167969, 30.7799489570313], | ||
372 | - [104.744151640625, 30.743149640625], | ||
373 | - [104.782806425781, 30.7193044257813], | ||
374 | - [104.791883574219, 30.6983815742188], | ||
375 | - [104.804881621094, 30.687583234375], | ||
376 | - [104.821922636719, 30.6482912421875], | ||
377 | - [104.841685820313, 30.6503054023438], | ||
378 | - [104.84310671875, 30.6363649726563], | ||
379 | - [104.813114042969, 30.5839968085938], | ||
380 | - [104.857345, 30.5938430000001], | ||
381 | - [104.860885039063, 30.5773830390625], | ||
382 | - [104.890797148438, 30.5420412421875], | ||
383 | - [104.877345, 30.5138430000001], | ||
384 | - [104.852386503906, 30.5077126289063], | ||
385 | - [104.815697050781, 30.5159377265625], | ||
386 | - [104.803260527344, 30.4979274726563], | ||
387 | - [104.759598417969, 30.4815895820313], | ||
388 | - [104.763624296875, 30.4995510078125], | ||
389 | - [104.731429472656, 30.5179274726563], | ||
390 | - [104.723260527344, 30.5397585273438], | ||
391 | - [104.68709109375, 30.5604030585937], | ||
392 | - [104.695557890625, 30.5981716132813], | ||
393 | - [104.674525175781, 30.6126955390625], | ||
394 | - [104.651898222656, 30.607622296875], | ||
395 | - [104.633260527344, 30.6197585273438], | ||
396 | - [104.601429472656, 30.6279274726563], | ||
397 | - [104.572623320313, 30.6400270820313], | ||
398 | - [104.532274199219, 30.630981671875], | ||
399 | - [104.523260527344, 30.6179274726563], | ||
400 | - [104.494569121094, 30.5981179023438], | ||
401 | - [104.437069121094, 30.5897585273438], | ||
402 | - [104.427345, 30.603843], | ||
403 | - [104.427345, 30.613843], | ||
404 | - [104.447345, 30.613843], | ||
405 | - [104.447345, 30.653843] | ||
406 | - ] | ||
407 | - ] | ||
408 | - ] | ||
409 | - } | ||
410 | - }, | ||
411 | - { | ||
412 | - "type": "Feature", | ||
413 | - "properties": { "name": "锦江区" }, | ||
414 | - "geometry": { | ||
415 | - "type": "MultiPolygon", | ||
416 | - "coordinates": [ | ||
417 | - [ | ||
418 | - [ | ||
419 | - [104.163216582031, 30.5891823554688], | ||
420 | - [104.157345, 30.563843], | ||
421 | - [104.131929960938, 30.5700856757812], | ||
422 | - [104.111998320313, 30.55710471875], | ||
423 | - [104.103260527344, 30.5697585273438], | ||
424 | - [104.077345, 30.573843], | ||
425 | - [104.083089628906, 30.6088088203125], | ||
426 | - [104.081605253906, 30.618843], | ||
427 | - [104.084486113281, 30.6383303046875], | ||
428 | - [104.07170046875, 30.6481984687501], | ||
429 | - [104.067345, 30.653843], | ||
430 | - [104.067345, 30.663843], | ||
431 | - [104.087345, 30.663843], | ||
432 | - [104.09170046875, 30.65819846875], | ||
433 | - [104.137345, 30.623843], | ||
434 | - [104.163216582031, 30.5891823554688] | ||
435 | - ] | ||
436 | - ] | ||
437 | - ] | ||
438 | - } | ||
439 | - }, | ||
440 | - { | ||
441 | - "type": "Feature", | ||
442 | - "properties": { "name": "龙泉驿区" }, | ||
443 | - "geometry": { | ||
444 | - "type": "MultiPolygon", | ||
445 | - "coordinates": [ | ||
446 | - [ | ||
447 | - [ | ||
448 | - [104.437345, 30.653843], | ||
449 | - [104.424647246094, 30.6484084296876], | ||
450 | - [104.433292265625, 30.630844953125], | ||
451 | - [104.447345, 30.653843], | ||
452 | - [104.447345, 30.613843], | ||
453 | - [104.427345, 30.613843], | ||
454 | - [104.427345, 30.603843], | ||
455 | - [104.411429472656, 30.5997585273438], | ||
456 | - [104.400186796875, 30.5834743476562], | ||
457 | - [104.403465605469, 30.568843], | ||
458 | - [104.395250273438, 30.5321950507813], | ||
459 | - [104.414586210938, 30.5188430000001], | ||
460 | - [104.401429472656, 30.5097585273438], | ||
461 | - [104.393260527344, 30.4979274726563], | ||
462 | - [104.342557402344, 30.4849147773438], | ||
463 | - [104.332615996094, 30.51147971875], | ||
464 | - [104.321673613281, 30.495630109375], | ||
465 | - [104.295545683594, 30.5014870429688], | ||
466 | - [104.252349882813, 30.483344953125], | ||
467 | - [104.247345, 30.463843], | ||
468 | - [104.207398710938, 30.4838747382813], | ||
469 | - [104.180657988281, 30.5371071601562], | ||
470 | - [104.160704375, 30.547202375], | ||
471 | - [104.157345, 30.563843], | ||
472 | - [104.163216582031, 30.5891823554688], | ||
473 | - [104.137345, 30.623843], | ||
474 | - [104.153260527344, 30.6279274726563], | ||
475 | - [104.161903105469, 30.6721804023438], | ||
476 | - [104.223260527344, 30.6879274726563], | ||
477 | - [104.227345, 30.693843], | ||
478 | - [104.233531523438, 30.6900295234376], | ||
479 | - [104.244737578125, 30.6718459296876], | ||
480 | - [104.261158476563, 30.7200295234375], | ||
481 | - [104.267345, 30.723843], | ||
482 | - [104.272857695313, 30.7167018867188], | ||
483 | - [104.308175078125, 30.7219216132813], | ||
484 | - [104.380941191406, 30.6921388984376], | ||
485 | - [104.392857695313, 30.6767018867188], | ||
486 | - [104.419906035156, 30.6806984687501], | ||
487 | - [104.437345, 30.6738430000001], | ||
488 | - [104.437345, 30.653843] | ||
489 | - ] | ||
490 | - ] | ||
491 | - ] | ||
492 | - } | ||
493 | - }, | ||
494 | - { | ||
495 | - "type": "Feature", | ||
496 | - "properties": { "name": "彭州市" }, | ||
497 | - "geometry": { | ||
498 | - "type": "MultiPolygon", | ||
499 | - "coordinates": [ | ||
500 | - [ | ||
501 | - [ | ||
502 | - [103.81298953125, 31.42948753125], | ||
503 | - [103.82490359375, 31.4140480781251], | ||
504 | - [103.862345, 31.4195827460938], | ||
505 | - [103.877345, 31.4173659492188], | ||
506 | - [103.892916289063, 31.4196657539063], | ||
507 | - [103.90170046875, 31.39819846875], | ||
508 | - [103.924615507813, 31.3602126289063], | ||
509 | - [103.887139921875, 31.3138430000001], | ||
510 | - [103.92298953125, 31.2694875312501], | ||
511 | - [103.93170046875, 31.22819846875], | ||
512 | - [103.94298953125, 31.21948753125], | ||
513 | - [103.951832304688, 31.2080275703125], | ||
514 | - [103.968695097656, 31.2105202460938], | ||
515 | - [104.014066191406, 31.1754982734376], | ||
516 | - [104.011363554688, 31.157192609375], | ||
517 | - [104.022850371094, 31.10274925], | ||
518 | - [104.05298953125, 31.0794875312501], | ||
519 | - [104.06170046875, 31.0681984687501], | ||
520 | - [104.07298953125, 31.05948753125], | ||
521 | - [104.089075957031, 31.0386452460938], | ||
522 | - [104.117345, 31.033843], | ||
523 | - [104.124969511719, 31.0214675117188], | ||
524 | - [104.160572539063, 30.9995314765625], | ||
525 | - [104.170816679688, 30.9666481757813], | ||
526 | - [104.140472441406, 30.9291847968751], | ||
527 | - [104.147345, 30.913843], | ||
528 | - [104.079295683594, 30.9183596015626], | ||
529 | - [104.043829375, 30.9643068671875], | ||
530 | - [103.95298953125, 30.92819846875], | ||
531 | - [103.917345, 30.923843], | ||
532 | - [103.907345, 30.923843], | ||
533 | - [103.907345, 30.9338430000001], | ||
534 | - [103.897345, 30.9338430000001], | ||
535 | - [103.852906523438, 30.9411428046876], | ||
536 | - [103.832135039063, 30.9380739570313], | ||
537 | - [103.787100859375, 30.9512038398437], | ||
538 | - [103.777345, 30.963843], | ||
539 | - [103.771219511719, 30.9858425117188], | ||
540 | - [103.751549101563, 31.0184523750001], | ||
541 | - [103.753140898438, 31.029233625], | ||
542 | - [103.729268828125, 31.0688088203125], | ||
543 | - [103.770584746094, 31.0803151679688], | ||
544 | - [103.74170046875, 31.12819846875], | ||
545 | - [103.732178984375, 31.1623928046875], | ||
546 | - [103.706058378906, 31.1825563789063], | ||
547 | - [103.677205839844, 31.2199343085937], | ||
548 | - [103.71744265625, 31.2742067695313], | ||
549 | - [103.695362578125, 31.3499343085938], | ||
550 | - [103.677345, 31.363843], | ||
551 | - [103.691439238281, 31.3867189765625], | ||
552 | - [103.728389921875, 31.39931175], | ||
553 | - [103.737345, 31.413843], | ||
554 | - [103.770704375, 31.430483625], | ||
555 | - [103.797345, 31.4338430000001], | ||
556 | - [103.81298953125, 31.42948753125] | ||
557 | - ] | ||
558 | - ] | ||
559 | - ] | ||
560 | - } | ||
561 | - }, | ||
562 | - { | ||
563 | - "type": "Feature", | ||
564 | - "properties": { "name": "蒲江县" }, | ||
565 | - "geometry": { | ||
566 | - "type": "MultiPolygon", | ||
567 | - "coordinates": [ | ||
568 | - [ | ||
569 | - [ | ||
570 | - [103.552906523438, 30.3396852851562], | ||
571 | - [103.562916289063, 30.3152321601562], | ||
572 | - [103.614813261719, 30.3229030585938], | ||
573 | - [103.680765410156, 30.304536359375], | ||
574 | - [103.68312625, 30.28855003125], | ||
575 | - [103.677345, 30.273843], | ||
576 | - [103.687345, 30.2538430000001], | ||
577 | - [103.652386503906, 30.236313703125], | ||
578 | - [103.643580351563, 30.2057985664063], | ||
579 | - [103.631954375, 30.2114748359375], | ||
580 | - [103.612735625, 30.1962111640626], | ||
581 | - [103.597345, 30.2037258125], | ||
582 | - [103.582345, 30.19640159375], | ||
583 | - [103.571353789063, 30.2017678046875], | ||
584 | - [103.563336210938, 30.1859181953125], | ||
585 | - [103.552218046875, 30.1913454414063], | ||
586 | - [103.533985625, 30.1809596992188], | ||
587 | - [103.545272246094, 30.1578493476563], | ||
588 | - [103.510704375, 30.140483625], | ||
589 | - [103.507345, 30.1338430000001], | ||
590 | - [103.482003203125, 30.1170973945313], | ||
591 | - [103.473260527344, 30.1297585273438], | ||
592 | - [103.433260527344, 30.1309841132812], | ||
593 | - [103.463260527344, 30.1197585273438], | ||
594 | - [103.463973417969, 30.0897585273438], | ||
595 | - [103.422264433594, 30.116919171875], | ||
596 | - [103.387345, 30.0938430000001], | ||
597 | - [103.383531523438, 30.1100295234375], | ||
598 | - [103.371158476563, 30.1276564765625], | ||
599 | - [103.354764433594, 30.1757595039063], | ||
600 | - [103.375714140625, 30.222524640625], | ||
601 | - [103.345240507813, 30.2413014960938], | ||
602 | - [103.322345, 30.2341701484375], | ||
603 | - [103.313531523438, 30.2600295234375], | ||
604 | - [103.307345, 30.263843], | ||
605 | - [103.312323027344, 30.2702907539063], | ||
606 | - [103.357164335938, 30.3035378242188], | ||
607 | - [103.39298953125, 30.31819846875], | ||
608 | - [103.413922148438, 30.3308254218751], | ||
609 | - [103.442345, 30.326626203125], | ||
610 | - [103.467345, 30.3303200507813], | ||
611 | - [103.482379179688, 30.3280983710938], | ||
612 | - [103.552906523438, 30.3396852851562] | ||
613 | - ] | ||
614 | - ] | ||
615 | - ] | ||
616 | - } | ||
617 | - }, | ||
618 | - { | ||
619 | - "type": "Feature", | ||
620 | - "properties": { "name": "青白江区" }, | ||
621 | - "geometry": { | ||
622 | - "type": "MultiPolygon", | ||
623 | - "coordinates": [ | ||
624 | - [ | ||
625 | - [ | ||
626 | - [104.457345, 30.663843], | ||
627 | - [104.457345, 30.653843], | ||
628 | - [104.447345, 30.653843], | ||
629 | - [104.447345, 30.663843], | ||
630 | - [104.457345, 30.663843] | ||
631 | - ] | ||
632 | - ], | ||
633 | - [ | ||
634 | - [ | ||
635 | - [104.367345, 30.843843], | ||
636 | - [104.362345, 30.8566506171875], | ||
637 | - [104.357345, 30.843843], | ||
638 | - [104.345152617188, 30.8404201484376], | ||
639 | - [104.353922148438, 30.8316506171875], | ||
640 | - [104.357345, 30.843843], | ||
641 | - [104.377684355469, 30.7829811835938], | ||
642 | - [104.422857695313, 30.7896584296876], | ||
643 | - [104.431832304688, 30.7780275703126], | ||
644 | - [104.442345, 30.7795827460938], | ||
645 | - [104.452345, 30.7781032539063], | ||
646 | - [104.471302519531, 30.7809059882813], | ||
647 | - [104.475301542969, 30.753843], | ||
648 | - [104.471549101563, 30.728452375], | ||
649 | - [104.483140898438, 30.7092336250001], | ||
650 | - [104.481529570313, 30.6983303046876], | ||
651 | - [104.493822050781, 30.688843], | ||
652 | - [104.48170046875, 30.67948753125], | ||
653 | - [104.47298953125, 30.66819846875], | ||
654 | - [104.457345, 30.663843], | ||
655 | - [104.457345, 30.6738430000001], | ||
656 | - [104.437345, 30.6738430000001], | ||
657 | - [104.419906035156, 30.6806984687501], | ||
658 | - [104.392857695313, 30.6767018867188], | ||
659 | - [104.380941191406, 30.6921388984376], | ||
660 | - [104.308175078125, 30.7219216132813], | ||
661 | - [104.272857695313, 30.7167018867188], | ||
662 | - [104.267345, 30.723843], | ||
663 | - [104.280301542969, 30.733843], | ||
664 | - [104.260203886719, 30.7493556953126], | ||
665 | - [104.263949003906, 30.7747023750001], | ||
666 | - [104.226378203125, 30.8253786445312], | ||
667 | - [104.243519316406, 30.838608625], | ||
668 | - [104.231668730469, 30.8582521796876], | ||
669 | - [104.161151152344, 30.8682765937501], | ||
670 | - [104.177345, 30.9038430000001], | ||
671 | - [104.187345, 30.9038430000001], | ||
672 | - [104.187345, 30.913843], | ||
673 | - [104.226236601563, 30.9053591132813], | ||
674 | - [104.31982546875, 30.8978395820313], | ||
675 | - [104.347345, 30.9038430000001], | ||
676 | - [104.356300078125, 30.8893117500001], | ||
677 | - [104.384456816406, 30.8797145820313], | ||
678 | - [104.373531523438, 30.8476564765625], | ||
679 | - [104.367345, 30.843843] | ||
680 | - ] | ||
681 | - ] | ||
682 | - ] | ||
683 | - } | ||
684 | - }, | ||
685 | - { | ||
686 | - "type": "Feature", | ||
687 | - "properties": { "name": "青羊区" }, | ||
688 | - "geometry": { | ||
689 | - "type": "MultiPolygon", | ||
690 | - "coordinates": [ | ||
691 | - [ | ||
692 | - [ | ||
693 | - [103.957345, 30.723843], | ||
694 | - [103.976312285156, 30.6963698554688], | ||
695 | - [104.004320097656, 30.7026491523438], | ||
696 | - [104.001051054688, 30.6880690742188], | ||
697 | - [104.023260527344, 30.6797585273438], | ||
698 | - [104.042345, 30.6673317695313], | ||
699 | - [104.061929960938, 30.6800856757813], | ||
700 | - [104.087345, 30.6738430000001], | ||
701 | - [104.087345, 30.663843], | ||
702 | - [104.067345, 30.663843], | ||
703 | - [104.067345, 30.653843], | ||
704 | - [103.991790800781, 30.6582888007813], | ||
705 | - [103.947345, 30.663843], | ||
706 | - [103.927345, 30.663843], | ||
707 | - [103.927345, 30.6738430000001], | ||
708 | - [103.917345, 30.6738430000001], | ||
709 | - [103.907345, 30.6738430000001], | ||
710 | - [103.900531035156, 30.6791042304688], | ||
711 | - [103.93170046875, 30.71948753125], | ||
712 | - [103.947345, 30.723843], | ||
713 | - [103.957345, 30.723843] | ||
714 | - ] | ||
715 | - ] | ||
716 | - ] | ||
717 | - } | ||
718 | - }, | ||
719 | - { | ||
720 | - "type": "Feature", | ||
721 | - "properties": { "name": "双流县" }, | ||
722 | - "geometry": { | ||
723 | - "type": "MultiPolygon", | ||
724 | - "coordinates": [ | ||
725 | - [ | ||
726 | - [ | ||
727 | - [103.917345, 30.6738430000001], | ||
728 | - [103.917345, 30.663843], | ||
729 | - [103.927345, 30.663843], | ||
730 | - [103.947345, 30.663843], | ||
731 | - [103.951158476563, 30.6376564765625], | ||
732 | - [103.963912382813, 30.5988747382813], | ||
733 | - [103.960787382813, 30.5888430000001], | ||
734 | - [103.965091582031, 30.5750270820313], | ||
735 | - [104.002345, 30.5866310859375], | ||
736 | - [104.036160917969, 30.5760964179688], | ||
737 | - [104.027672148438, 30.548843], | ||
738 | - [104.073079863281, 30.5333693671875], | ||
739 | - [104.077345, 30.573843], | ||
740 | - [104.103260527344, 30.5697585273438], | ||
741 | - [104.111998320313, 30.55710471875], | ||
742 | - [104.131929960938, 30.5700856757812], | ||
743 | - [104.157345, 30.563843], | ||
744 | - [104.160704375, 30.547202375], | ||
745 | - [104.180657988281, 30.5371071601562], | ||
746 | - [104.207398710938, 30.4838747382813], | ||
747 | - [104.247345, 30.463843], | ||
748 | - [104.2682825, 30.458012921875], | ||
749 | - [104.248631621094, 30.4325563789063], | ||
750 | - [104.23170046875, 30.41948753125], | ||
751 | - [104.218631621094, 30.3875563789063], | ||
752 | - [104.20170046875, 30.3594875312501], | ||
753 | - [104.187345, 30.3238430000001], | ||
754 | - [104.182154570313, 30.3190334296876], | ||
755 | - [104.158365507813, 30.2821950507813], | ||
756 | - [104.133433867188, 30.2293654609376], | ||
757 | - [104.042503691406, 30.269048078125], | ||
758 | - [104.032345, 30.2686452460938], | ||
759 | - [104.017345, 30.2692385078126], | ||
760 | - [104.002193632813, 30.2686379218751], | ||
761 | - [103.987345, 30.273843], | ||
762 | - [103.971656523438, 30.312798078125], | ||
763 | - [103.943065214844, 30.3348635078125], | ||
764 | - [103.93298953125, 30.3594875312501], | ||
765 | - [103.917345, 30.3638430000001], | ||
766 | - [103.931698027344, 30.4038430000001], | ||
767 | - [103.912034941406, 30.4586428046875], | ||
768 | - [103.912642851563, 30.468843], | ||
769 | - [103.9116809375, 30.4849684882813], | ||
770 | - [103.882064238281, 30.4985622382813], | ||
771 | - [103.871585722656, 30.5102883125], | ||
772 | - [103.831585722656, 30.5079030585938], | ||
773 | - [103.817345, 30.523843], | ||
774 | - [103.810721464844, 30.5386305976563], | ||
775 | - [103.820518828125, 30.5700807929688], | ||
776 | - [103.801158476563, 30.5976564765625], | ||
777 | - [103.797345, 30.623843], | ||
778 | - [103.832081328125, 30.6098805976563], | ||
779 | - [103.869505644531, 30.6601930976563], | ||
780 | - [103.882345, 30.6579811835938], | ||
781 | - [103.897486601563, 30.6605886054688], | ||
782 | - [103.907345, 30.6738430000001], | ||
783 | - [103.917345, 30.6738430000001] | ||
784 | - ] | ||
785 | - ] | ||
786 | - ] | ||
787 | - } | ||
788 | - }, | ||
789 | - { | ||
790 | - "type": "Feature", | ||
791 | - "properties": { "name": "温江区" }, | ||
792 | - "geometry": { | ||
793 | - "type": "MultiPolygon", | ||
794 | - "coordinates": [ | ||
795 | - [ | ||
796 | - [ | ||
797 | - [103.927345, 30.663843], | ||
798 | - [103.917345, 30.663843], | ||
799 | - [103.917345, 30.6738430000001], | ||
800 | - [103.927345, 30.6738430000001], | ||
801 | - [103.927345, 30.663843] | ||
802 | - ] | ||
803 | - ], | ||
804 | - [ | ||
805 | - [ | ||
806 | - [103.801607695313, 30.7860329414063], | ||
807 | - [103.86705203125, 30.747563703125], | ||
808 | - [103.895206328125, 30.7510646796876], | ||
809 | - [103.94099734375, 30.7317702460938], | ||
810 | - [103.947345, 30.723843], | ||
811 | - [103.93170046875, 30.71948753125], | ||
812 | - [103.900531035156, 30.6791042304688], | ||
813 | - [103.907345, 30.6738430000001], | ||
814 | - [103.897486601563, 30.6605886054688], | ||
815 | - [103.882345, 30.6579811835938], | ||
816 | - [103.869505644531, 30.6601930976563], | ||
817 | - [103.832081328125, 30.6098805976563], | ||
818 | - [103.797345, 30.623843], | ||
819 | - [103.785513945313, 30.6320119453125], | ||
820 | - [103.760943632813, 30.6675954414063], | ||
821 | - [103.763565703125, 30.6792897773438], | ||
822 | - [103.751429472656, 30.6979274726563], | ||
823 | - [103.743260527344, 30.7197585273438], | ||
824 | - [103.731429472656, 30.7379274726563], | ||
825 | - [103.727345, 30.753843], | ||
826 | - [103.721790800781, 30.7682888007813], | ||
827 | - [103.712899199219, 30.8093971992188], | ||
828 | - [103.683756132813, 30.8852126289063], | ||
829 | - [103.717345, 30.8638430000001], | ||
830 | - [103.721790800781, 30.8482888007813], | ||
831 | - [103.752899199219, 30.8293971992187], | ||
832 | - [103.761790800781, 30.8182888007813], | ||
833 | - [103.782899199219, 30.8093971992188], | ||
834 | - [103.801607695313, 30.7860329414063] | ||
835 | - ] | ||
836 | - ] | ||
837 | - ] | ||
838 | - } | ||
839 | - }, | ||
840 | - { | ||
841 | - "type": "Feature", | ||
842 | - "properties": { "name": "武侯区" }, | ||
843 | - "geometry": { | ||
844 | - "type": "MultiPolygon", | ||
845 | - "coordinates": [ | ||
846 | - [ | ||
847 | - [ | ||
848 | - [104.083089628906, 30.6088088203125], | ||
849 | - [104.077345, 30.573843], | ||
850 | - [104.073079863281, 30.5333693671875], | ||
851 | - [104.027672148438, 30.548843], | ||
852 | - [104.036160917969, 30.5760964179688], | ||
853 | - [104.002345, 30.5866310859375], | ||
854 | - [103.965091582031, 30.5750270820313], | ||
855 | - [103.960787382813, 30.5888430000001], | ||
856 | - [103.963912382813, 30.5988747382813], | ||
857 | - [103.951158476563, 30.6376564765625], | ||
858 | - [103.947345, 30.663843], | ||
859 | - [103.991790800781, 30.6582888007813], | ||
860 | - [104.067345, 30.653843], | ||
861 | - [104.07170046875, 30.6481984687501], | ||
862 | - [104.084486113281, 30.6383303046875], | ||
863 | - [104.081605253906, 30.618843], | ||
864 | - [104.083089628906, 30.6088088203125] | ||
865 | - ] | ||
866 | - ] | ||
867 | - ] | ||
868 | - } | ||
869 | - }, | ||
870 | - { | ||
871 | - "type": "Feature", | ||
872 | - "properties": { "name": "新都区" }, | ||
873 | - "geometry": { | ||
874 | - "type": "MultiPolygon", | ||
875 | - "coordinates": [ | ||
876 | - [ | ||
877 | - [ | ||
878 | - [104.177345, 30.9038430000001], | ||
879 | - [104.177345, 30.913843], | ||
880 | - [104.187345, 30.913843], | ||
881 | - [104.187345, 30.9038430000001], | ||
882 | - [104.177345, 30.9038430000001] | ||
883 | - ] | ||
884 | - ], | ||
885 | - [ | ||
886 | - [ | ||
887 | - [103.907345, 30.923843], | ||
888 | - [103.897345, 30.923843], | ||
889 | - [103.897345, 30.9338430000001], | ||
890 | - [103.907345, 30.9338430000001], | ||
891 | - [103.907345, 30.923843] | ||
892 | - ] | ||
893 | - ], | ||
894 | - [ | ||
895 | - [ | ||
896 | - [104.177345, 30.9038430000001], | ||
897 | - [104.161151152344, 30.8682765937501], | ||
898 | - [104.231668730469, 30.8582521796876], | ||
899 | - [104.243519316406, 30.838608625], | ||
900 | - [104.226378203125, 30.8253786445312], | ||
901 | - [104.263949003906, 30.7747023750001], | ||
902 | - [104.260203886719, 30.7493556953126], | ||
903 | - [104.280301542969, 30.733843], | ||
904 | - [104.267345, 30.723843], | ||
905 | - [104.261158476563, 30.7200295234375], | ||
906 | - [104.244737578125, 30.6718459296876], | ||
907 | - [104.233531523438, 30.6900295234376], | ||
908 | - [104.227345, 30.693843], | ||
909 | - [104.219771757813, 30.708813703125], | ||
910 | - [104.190704375, 30.717202375], | ||
911 | - [104.172735625, 30.7314748359376], | ||
912 | - [104.161353789063, 30.7259181953125], | ||
913 | - [104.153985625, 30.740483625], | ||
914 | - [104.140704375, 30.747202375], | ||
915 | - [104.137345, 30.753843], | ||
916 | - [104.132806425781, 30.7593044257813], | ||
917 | - [104.121795683594, 30.768452375], | ||
918 | - [104.123385039063, 30.7840578437501], | ||
919 | - [104.058656035156, 30.8083815742188], | ||
920 | - [104.065233183594, 30.7676076484375], | ||
921 | - [104.091685820313, 30.7703054023438], | ||
922 | - [104.093704863281, 30.7505104804688], | ||
923 | - [104.06531375, 30.7476174140625], | ||
924 | - [104.037345, 30.753843], | ||
925 | - [104.033260527344, 30.7597585273437], | ||
926 | - [104.019056425781, 30.8175905585938], | ||
927 | - [103.977706328125, 30.8330617500001], | ||
928 | - [103.939791289063, 30.8624489570313], | ||
929 | - [103.948099394531, 30.8995143867188], | ||
930 | - [103.921429472656, 30.9179274726563], | ||
931 | - [103.917345, 30.923843], | ||
932 | - [103.95298953125, 30.92819846875], | ||
933 | - [104.043829375, 30.9643068671875], | ||
934 | - [104.079295683594, 30.9183596015626], | ||
935 | - [104.147345, 30.913843], | ||
936 | - [104.163326445313, 30.9217873359376], | ||
937 | - [104.170704375, 30.907202375], | ||
938 | - [104.177345, 30.9038430000001] | ||
939 | - ] | ||
940 | - ] | ||
941 | - ] | ||
942 | - } | ||
943 | - }, | ||
944 | - { | ||
945 | - "type": "Feature", | ||
946 | - "properties": { "name": "新津县" }, | ||
947 | - "geometry": { | ||
948 | - "type": "MultiPolygon", | ||
949 | - "coordinates": [ | ||
950 | - [ | ||
951 | - [ | ||
952 | - [103.817345, 30.523843], | ||
953 | - [103.831585722656, 30.5079030585938], | ||
954 | - [103.871585722656, 30.5102883125], | ||
955 | - [103.882064238281, 30.4985622382813], | ||
956 | - [103.9116809375, 30.4849684882813], | ||
957 | - [103.912642851563, 30.468843], | ||
958 | - [103.912034941406, 30.4586428046875], | ||
959 | - [103.931698027344, 30.4038430000001], | ||
960 | - [103.917345, 30.3638430000001], | ||
961 | - [103.912205839844, 30.3406740546876], | ||
962 | - [103.884998808594, 30.3304201484375], | ||
963 | - [103.869691191406, 30.3572658515625], | ||
964 | - [103.827345, 30.3413039375], | ||
965 | - [103.794564238281, 30.3536598945313], | ||
966 | - [103.770975371094, 30.3402126289063], | ||
967 | - [103.767345, 30.3338430000001], | ||
968 | - [103.752623320313, 30.3400270820313], | ||
969 | - [103.728011503906, 30.3345095039062], | ||
970 | - [103.750985136719, 30.369790265625], | ||
971 | - [103.714151640625, 30.4173171210938], | ||
972 | - [103.707345, 30.4438430000001], | ||
973 | - [103.730220976563, 30.4579372382812], | ||
974 | - [103.743990507813, 30.4983425117188], | ||
975 | - [103.767345, 30.503843], | ||
976 | - [103.799732695313, 30.5067263007813], | ||
977 | - [103.784957304688, 30.5209596992188], | ||
978 | - [103.817345, 30.523843] | ||
979 | - ] | ||
980 | - ] | ||
981 | - ] | ||
982 | - } | ||
983 | - }, | ||
984 | - { | ||
985 | - "type": "Feature", | ||
986 | - "properties": { "name": "邛崃市" }, | ||
987 | - "geometry": { | ||
988 | - "type": "MultiPolygon", | ||
989 | - "coordinates": [ | ||
990 | - [ | ||
991 | - [ | ||
992 | - [103.127345, 30.4438430000001], | ||
993 | - [103.130767851563, 30.4316506171875], | ||
994 | - [103.139537382813, 30.4404201484375], | ||
995 | - [103.133360625, 30.4672829414063], | ||
996 | - [103.172713652344, 30.4944533515626], | ||
997 | - [103.177345, 30.523843], | ||
998 | - [103.20298953125, 30.51948753125], | ||
999 | - [103.221954375, 30.5080471015625], | ||
1000 | - [103.232345, 30.5095827460938], | ||
1001 | - [103.260809355469, 30.505376203125], | ||
1002 | - [103.272857695313, 30.5209841132813], | ||
1003 | - [103.292916289063, 30.5180202460938], | ||
1004 | - [103.303482695313, 30.5438381171875], | ||
1005 | - [103.347345, 30.5503200507813], | ||
1006 | - [103.367345, 30.5473659492188], | ||
1007 | - [103.388421660156, 30.5504787421876], | ||
1008 | - [103.437913847656, 30.5160622382813], | ||
1009 | - [103.459075957031, 30.4886452460938], | ||
1010 | - [103.51298953125, 30.47948753125], | ||
1011 | - [103.55158328125, 30.4294875312501], | ||
1012 | - [103.623175078125, 30.4382228828125], | ||
1013 | - [103.62045046875, 30.4566677070313], | ||
1014 | - [103.646654082031, 30.4724758125001], | ||
1015 | - [103.707345, 30.4438430000001], | ||
1016 | - [103.714151640625, 30.4173171210938], | ||
1017 | - [103.750985136719, 30.369790265625], | ||
1018 | - [103.728011503906, 30.3345095039062], | ||
1019 | - [103.752623320313, 30.3400270820313], | ||
1020 | - [103.767345, 30.3338430000001], | ||
1021 | - [103.763985625, 30.327202375], | ||
1022 | - [103.729417753906, 30.3098366523438], | ||
1023 | - [103.739888945313, 30.28839378125], | ||
1024 | - [103.717345, 30.2838430000001], | ||
1025 | - [103.707345, 30.2838430000001], | ||
1026 | - [103.707345, 30.273843], | ||
1027 | - [103.677345, 30.273843], | ||
1028 | - [103.68312625, 30.28855003125], | ||
1029 | - [103.680765410156, 30.304536359375], | ||
1030 | - [103.614813261719, 30.3229030585938], | ||
1031 | - [103.562916289063, 30.3152321601562], | ||
1032 | - [103.552906523438, 30.3396852851562], | ||
1033 | - [103.482379179688, 30.3280983710938], | ||
1034 | - [103.467345, 30.3303200507813], | ||
1035 | - [103.442345, 30.326626203125], | ||
1036 | - [103.413922148438, 30.3308254218751], | ||
1037 | - [103.39298953125, 30.31819846875], | ||
1038 | - [103.357164335938, 30.3035378242188], | ||
1039 | - [103.312323027344, 30.2702907539063], | ||
1040 | - [103.307345, 30.263843], | ||
1041 | - [103.25625125, 30.2574513984375], | ||
1042 | - [103.222345, 30.2151125312501], | ||
1043 | - [103.202899199219, 30.2393971992188], | ||
1044 | - [103.1839465625, 30.2545729804688], | ||
1045 | - [103.155213652344, 30.2186916328126], | ||
1046 | - [103.127345, 30.2138430000001], | ||
1047 | - [103.087567167969, 30.2206008125001], | ||
1048 | - [103.07298953125, 30.2394875312501], | ||
1049 | - [103.067345, 30.243843], | ||
1050 | - [103.0608996875, 30.2722194648438], | ||
1051 | - [103.063587675781, 30.2938430000001], | ||
1052 | - [103.061441679688, 30.3111086250001], | ||
1053 | - [103.123924589844, 30.3611428046876], | ||
1054 | - [103.114879179688, 30.4338600898438], | ||
1055 | - [103.127345, 30.4438430000001] | ||
1056 | - ] | ||
1057 | - ] | ||
1058 | - ] | ||
1059 | - } | ||
1060 | - }, | ||
1061 | - { | ||
1062 | - "type": "Feature", | ||
1063 | - "properties": { "name": "郫县" }, | ||
1064 | - "geometry": { | ||
1065 | - "type": "MultiPolygon", | ||
1066 | - "coordinates": [ | ||
1067 | - [ | ||
1068 | - [ | ||
1069 | - [103.787100859375, 30.9512038398437], | ||
1070 | - [103.832135039063, 30.9380739570313], | ||
1071 | - [103.852906523438, 30.9411428046876], | ||
1072 | - [103.897345, 30.9338430000001], | ||
1073 | - [103.897345, 30.923843], | ||
1074 | - [103.907345, 30.923843], | ||
1075 | - [103.917345, 30.923843], | ||
1076 | - [103.921429472656, 30.9179274726563], | ||
1077 | - [103.948099394531, 30.8995143867188], | ||
1078 | - [103.939791289063, 30.8624489570313], | ||
1079 | - [103.977706328125, 30.8330617500001], | ||
1080 | - [104.019056425781, 30.8175905585938], | ||
1081 | - [104.033260527344, 30.7597585273437], | ||
1082 | - [104.037345, 30.753843], | ||
1083 | - [104.0341809375, 30.73212425], | ||
1084 | - [104.000716582031, 30.7653542304688], | ||
1085 | - [103.994801054688, 30.7363869453125], | ||
1086 | - [103.959888945313, 30.7312990546876], | ||
1087 | - [103.957345, 30.723843], | ||
1088 | - [103.947345, 30.723843], | ||
1089 | - [103.94099734375, 30.7317702460938], | ||
1090 | - [103.895206328125, 30.7510646796876], | ||
1091 | - [103.86705203125, 30.747563703125], | ||
1092 | - [103.801607695313, 30.7860329414063], | ||
1093 | - [103.782899199219, 30.8093971992188], | ||
1094 | - [103.761790800781, 30.8182888007813], | ||
1095 | - [103.752899199219, 30.8293971992187], | ||
1096 | - [103.721790800781, 30.8482888007813], | ||
1097 | - [103.717345, 30.8638430000001], | ||
1098 | - [103.753616972656, 30.8881667304688], | ||
1099 | - [103.751160917969, 30.8991213203126], | ||
1100 | - [103.763260527344, 30.9279274726563], | ||
1101 | - [103.771429472656, 30.9597585273438], | ||
1102 | - [103.777345, 30.963843], | ||
1103 | - [103.787100859375, 30.9512038398437] | ||
1104 | - ] | ||
1105 | - ] | ||
1106 | - ] | ||
1107 | - } | ||
1108 | - } | ||
1109 | - ] | 1 | +[ |
2 | + { | ||
3 | + "name": "四川省", | ||
4 | + "value": [104.10068024609373, 30.580525329665175, 20000], | ||
5 | + "height": 5, | ||
6 | + "itemStyle": { | ||
7 | + "color": "pink", | ||
8 | + "opacity": 1, | ||
9 | + "borderWidth": 0.4, | ||
10 | + "borderColor": "#5F9EA0" | ||
11 | + } | ||
12 | + }, | ||
13 | + { | ||
14 | + "name": "湖南省", | ||
15 | + "value": [111.73068512890623, 27.86754509366569, 20000], | ||
16 | + "height": 4, | ||
17 | + "itemStyle": { | ||
18 | + "color": "blue", | ||
19 | + "opacity": 1, | ||
20 | + "borderWidth": 0.4, | ||
21 | + "borderColor": "#5F9EA0" | ||
22 | + } | ||
23 | + }, | ||
24 | + { | ||
25 | + "name": "吉林省", | ||
26 | + "value": [126.45236481640623, 43.7943407914815, 20000], | ||
27 | + "height": 5, | ||
28 | + "itemStyle": { | ||
29 | + "color": "yellow", | ||
30 | + "opacity": 1, | ||
31 | + "borderWidth": 0.4, | ||
32 | + "borderColor": "#5F9EA0" | ||
33 | + } | ||
34 | + }, | ||
35 | + { | ||
36 | + "name": "山东省", | ||
37 | + "value": [118.67404450390623, 36.16387465872037, 20000], | ||
38 | + "height": 6, | ||
39 | + "itemStyle": { | ||
40 | + "color": "orange", | ||
41 | + "opacity": 1, | ||
42 | + "borderWidth": 0.4, | ||
43 | + "borderColor": "#5F9EA0" | ||
44 | + } | ||
1110 | } | 45 | } |
1111 | - | ||
46 | +] |
@@ -13,5 +13,5 @@ export const AddThreeDimensionalMapConfig: ConfigType = { | @@ -13,5 +13,5 @@ export const AddThreeDimensionalMapConfig: ConfigType = { | ||
13 | categoryName: ChatCategoryEnumName.MAP, | 13 | categoryName: ChatCategoryEnumName.MAP, |
14 | package: PackagesCategoryEnum.CHARTS, | 14 | package: PackagesCategoryEnum.CHARTS, |
15 | chartFrame: ChartFrameEnum.COMMON, | 15 | chartFrame: ChartFrameEnum.COMMON, |
16 | - image: 'map.png' | 16 | + image: 'map3D.png' |
17 | } | 17 | } |
@@ -9,7 +9,9 @@ import * as echarts from 'echarts' | @@ -9,7 +9,9 @@ import * as echarts from 'echarts' | ||
9 | import { registerMap } from 'echarts/core' | 9 | import { registerMap } from 'echarts/core' |
10 | import 'echarts-gl' | 10 | import 'echarts-gl' |
11 | import config from './config' | 11 | import config from './config' |
12 | -import { dataMaps } from './mock' | 12 | +import cityMap from '../OverrideMapBase/mapGeojson/china-main-city-map.json' |
13 | + | ||
14 | +type historyDataType = { name: string; code: string } | ||
13 | 15 | ||
14 | const props = defineProps({ | 16 | const props = defineProps({ |
15 | chartConfig: { | 17 | chartConfig: { |
@@ -18,12 +20,80 @@ const props = defineProps({ | @@ -18,12 +20,80 @@ const props = defineProps({ | ||
18 | } | 20 | } |
19 | }) | 21 | }) |
20 | 22 | ||
23 | +const iconStr = ref( | ||
24 | + 'path://M853.333333 245.333333H245.333333l93.866667-93.866666c12.8-12.8 12.8-34.133333 0-46.933334-12.8-12.8-34.133333-12.8-46.933333 0l-145.066667 145.066667c-12.8 12.8-12.8 34.133333 0 46.933333l145.066667 145.066667c6.4 6.4 14.933333 10.666667 23.466666 10.666667s17.066667-4.266667 23.466667-10.666667c12.8-12.8 12.8-34.133333 0-46.933333L256 311.466667h597.333333c6.4 0 10.666667 4.266667 10.666667 10.666666v426.666667c0 6.4-4.266667 10.666667-10.666667 10.666667H170.666667c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h682.666666c40.533333 0 74.666667-34.133333 74.666667-74.666667V320c0-40.533333-34.133333-74.666667-74.666667-74.666667z' | ||
25 | +) | ||
26 | + | ||
27 | +const historyData = ref<historyDataType[]>([]) | ||
28 | + | ||
21 | const { w, h } = toRefs(props.chartConfig.attr) | 29 | const { w, h } = toRefs(props.chartConfig.attr) |
22 | 30 | ||
23 | const map3DRef = ref() | 31 | const map3DRef = ref() |
24 | 32 | ||
25 | const chartInstance = ref() | 33 | const chartInstance = ref() |
26 | 34 | ||
35 | +const saveSelectValue = ref('') | ||
36 | + | ||
37 | +const toolBoxOption = ref({ | ||
38 | + show: true, | ||
39 | + right: 110, | ||
40 | + top: 20, | ||
41 | + feature: { | ||
42 | + myFullButton: { | ||
43 | + show: true, | ||
44 | + title: '返回', | ||
45 | + icon: iconStr.value, | ||
46 | + iconStyle: { | ||
47 | + color: '' | ||
48 | + }, | ||
49 | + onclick: () => watchAdcode() | ||
50 | + } | ||
51 | + } | ||
52 | +}) | ||
53 | + | ||
54 | +watch( | ||
55 | + () => props.chartConfig.option, | ||
56 | + newData => { | ||
57 | + const { iconColor, drillingIn, iconDistanceRight, iconDistanceTop } = newData | ||
58 | + toolBoxOption.value.feature.myFullButton.show = drillingIn | ||
59 | + toolBoxOption.value.feature.myFullButton.iconStyle.color = iconColor | ||
60 | + toolBoxOption.value.right = iconDistanceRight | ||
61 | + toolBoxOption.value.top = iconDistanceTop | ||
62 | + }, | ||
63 | + { | ||
64 | + deep: true | ||
65 | + } | ||
66 | +) | ||
67 | + | ||
68 | +props.chartConfig.option = { | ||
69 | + ...props.chartConfig.option, | ||
70 | + ...{ toolbox: toolBoxOption.value } | ||
71 | +} | ||
72 | + | ||
73 | +//地图点击返回 | ||
74 | +const watchAdcode = () => { | ||
75 | + if (props.chartConfig.option.drillingIn) { | ||
76 | + const code = historyData.value.at(-2)?.code | ||
77 | + props.chartConfig.option.mapRegion.adcode = code ? code : 'china' | ||
78 | + historyData.value.pop() | ||
79 | + } | ||
80 | +} | ||
81 | + | ||
82 | +//地图点击 | ||
83 | +const handleMap3DClick = async (params: any) => { | ||
84 | + if (props.chartConfig.option.drillingIn) { | ||
85 | + const { name } = params | ||
86 | + saveSelectValue.value = name | ||
87 | + const findAdcode = (cityMap as any)[name] | ||
88 | + if (!findAdcode) return | ||
89 | + props.chartConfig.option.mapRegion.adcode = findAdcode | ||
90 | + historyData.value.push({ | ||
91 | + name, | ||
92 | + code: findAdcode | ||
93 | + }) | ||
94 | + } | ||
95 | +} | ||
96 | + | ||
27 | //动态获取geojson文件进行注册地图 | 97 | //动态获取geojson文件进行注册地图 |
28 | const getGeojson = (regionId: string) => { | 98 | const getGeojson = (regionId: string) => { |
29 | try { | 99 | try { |
@@ -53,18 +123,23 @@ const initMap = async () => { | @@ -53,18 +123,23 @@ const initMap = async () => { | ||
53 | await nextTick() | 123 | await nextTick() |
54 | await getGeojson(props.chartConfig.option.mapRegion.adcode) | 124 | await getGeojson(props.chartConfig.option.mapRegion.adcode) |
55 | await nextTick().then(() => { | 125 | await nextTick().then(() => { |
56 | - vEchartsSetOption(props.chartConfig.option) | 126 | + handleSetOption(chartInstance.value, props.chartConfig.option) |
57 | }) | 127 | }) |
58 | - | ||
59 | chartInstance.value.on('click', (e: any) => { | 128 | chartInstance.value.on('click', (e: any) => { |
60 | - console.log(e) | 129 | + console.log(`地图点击`, e) |
130 | + // handleMap3DClick(e) | ||
61 | }) | 131 | }) |
62 | } | 132 | } |
63 | 133 | ||
64 | // 手动触发渲染 | 134 | // 手动触发渲染 |
65 | -const vEchartsSetOption = (option: any) => { | ||
66 | - chartInstance.value.clear() | ||
67 | - chartInstance.value.setOption(option) | 135 | +const handleSetOption = (instance: any, option: any) => { |
136 | + if (!instance) return | ||
137 | + try { | ||
138 | + instance.clear() | ||
139 | + instance.setOption(option) | ||
140 | + // eslint-disable-next-line no-empty | ||
141 | + } finally { | ||
142 | + } | ||
68 | } | 143 | } |
69 | 144 | ||
70 | onMounted(() => { | 145 | onMounted(() => { |
@@ -81,11 +156,10 @@ watch( | @@ -81,11 +156,10 @@ watch( | ||
81 | props.chartConfig.option.series.forEach((item: any) => { | 156 | props.chartConfig.option.series.forEach((item: any) => { |
82 | if (item.type === 'map3D') { | 157 | if (item.type === 'map3D') { |
83 | item.map = newData | 158 | item.map = newData |
84 | - item.data = dataMaps | 159 | + item.data = props.chartConfig.option.dataset |
85 | } | 160 | } |
86 | }) | 161 | }) |
87 | - initMap() | ||
88 | - vEchartsSetOption(props.chartConfig.option) | 162 | + handleSetOption(chartInstance.value, props.chartConfig.option) |
89 | } catch (error) { | 163 | } catch (error) { |
90 | console.log(error) | 164 | console.log(error) |
91 | } | 165 | } |
@@ -98,12 +172,29 @@ watch( | @@ -98,12 +172,29 @@ watch( | ||
98 | // 监听地图右侧配置项变化 | 172 | // 监听地图右侧配置项变化 |
99 | watch( | 173 | watch( |
100 | props.chartConfig.option, | 174 | props.chartConfig.option, |
175 | + async newData => { | ||
176 | + try { | ||
177 | + handleSetOption(chartInstance.value, newData) | ||
178 | + } catch (error) { | ||
179 | + console.log(error) | ||
180 | + } | ||
181 | + }, | ||
182 | + { | ||
183 | + deep: true | ||
184 | + } | ||
185 | +) | ||
186 | + | ||
187 | +// 监听地图dataset配置项变化 | ||
188 | +watch( | ||
189 | + () => props.chartConfig.option.dataset, | ||
101 | newData => { | 190 | newData => { |
102 | try { | 191 | try { |
103 | - nextTick(() => { | ||
104 | - initMap() | ||
105 | - vEchartsSetOption(newData) | 192 | + props.chartConfig.option.series.forEach((item: any) => { |
193 | + if (item.type === 'map3D') { | ||
194 | + item.data = newData | ||
195 | + } | ||
106 | }) | 196 | }) |
197 | + handleSetOption(chartInstance.value, props.chartConfig.option) | ||
107 | } catch (error) { | 198 | } catch (error) { |
108 | console.log(error) | 199 | console.log(error) |
109 | } | 200 | } |
src/packages/components/external/Charts/Maps/AddThreeDimensionalMap/mock.ts
deleted
100644 → 0
1 | -export const dataMaps = [ | ||
2 | - { | ||
3 | - name: '北京', | ||
4 | - value: '293', | ||
5 | - height: 2.93 | ||
6 | - }, | ||
7 | - { | ||
8 | - name: '天津', | ||
9 | - value: '217', | ||
10 | - height: 2.17 | ||
11 | - }, | ||
12 | - { | ||
13 | - name: '河北', | ||
14 | - value: '67', | ||
15 | - height: 0.67 | ||
16 | - }, | ||
17 | - { | ||
18 | - name: '山西', | ||
19 | - value: '222', | ||
20 | - height: 2.22 | ||
21 | - }, | ||
22 | - { | ||
23 | - name: '内蒙古', | ||
24 | - value: '52', | ||
25 | - height: 0.52 | ||
26 | - }, | ||
27 | - { | ||
28 | - name: '辽宁', | ||
29 | - value: '270', | ||
30 | - height: 2.7 | ||
31 | - }, | ||
32 | - { | ||
33 | - name: '吉林', | ||
34 | - value: '249', | ||
35 | - height: 2.49 | ||
36 | - }, | ||
37 | - { | ||
38 | - name: '黑龙江', | ||
39 | - value: '218', | ||
40 | - height: 2.18 | ||
41 | - }, | ||
42 | - { | ||
43 | - name: '上海', | ||
44 | - value: '71', | ||
45 | - height: 0.71 | ||
46 | - }, | ||
47 | - { | ||
48 | - name: '江苏', | ||
49 | - value: '178', | ||
50 | - height: 1.78 | ||
51 | - }, | ||
52 | - { | ||
53 | - name: '浙江', | ||
54 | - value: '263', | ||
55 | - height: 2.63 | ||
56 | - }, | ||
57 | - { | ||
58 | - name: '安徽', | ||
59 | - value: '153', | ||
60 | - height: 1.53 | ||
61 | - }, | ||
62 | - { | ||
63 | - name: '福建', | ||
64 | - value: '1', | ||
65 | - height: 0.01 | ||
66 | - }, | ||
67 | - { | ||
68 | - name: '江西', | ||
69 | - value: '298', | ||
70 | - height: 2.98 | ||
71 | - }, | ||
72 | - { | ||
73 | - name: '山东', | ||
74 | - value: '98', | ||
75 | - height: 0.98 | ||
76 | - }, | ||
77 | - { | ||
78 | - name: '河南', | ||
79 | - value: '161', | ||
80 | - height: 1.61 | ||
81 | - }, | ||
82 | - { | ||
83 | - name: '湖北', | ||
84 | - value: '69', | ||
85 | - height: 0.69 | ||
86 | - }, | ||
87 | - { | ||
88 | - name: '湖南', | ||
89 | - value: '73', | ||
90 | - height: 0.73 | ||
91 | - }, | ||
92 | - { | ||
93 | - name: '重庆', | ||
94 | - value: '188', | ||
95 | - height: 1.88 | ||
96 | - }, | ||
97 | - { | ||
98 | - name: '四川', | ||
99 | - value: '215', | ||
100 | - height: 2.15 | ||
101 | - }, | ||
102 | - { | ||
103 | - name: '贵州', | ||
104 | - value: '119', | ||
105 | - height: 1.19 | ||
106 | - }, | ||
107 | - { | ||
108 | - name: '云南', | ||
109 | - value: '18', | ||
110 | - height: 0.18 | ||
111 | - }, | ||
112 | - { | ||
113 | - name: '西藏', | ||
114 | - value: '13', | ||
115 | - height: 0.13 | ||
116 | - }, | ||
117 | - { | ||
118 | - name: '陕西', | ||
119 | - value: '297', | ||
120 | - height: 2.97 | ||
121 | - }, | ||
122 | - { | ||
123 | - name: '甘肃', | ||
124 | - value: '265', | ||
125 | - height: 2.65 | ||
126 | - }, | ||
127 | - { | ||
128 | - name: '青海', | ||
129 | - value: '292', | ||
130 | - height: 2.92 | ||
131 | - }, | ||
132 | - { | ||
133 | - name: '宁夏', | ||
134 | - value: '264', | ||
135 | - height: 2.64 | ||
136 | - }, | ||
137 | - { | ||
138 | - name: '新疆', | ||
139 | - value: '215', | ||
140 | - height: 2.15 | ||
141 | - }, | ||
142 | - { | ||
143 | - name: '广东', | ||
144 | - value: '259', | ||
145 | - height: 2.59 | ||
146 | - }, | ||
147 | - { | ||
148 | - name: '广西', | ||
149 | - value: '300', | ||
150 | - height: 3 | ||
151 | - }, | ||
152 | - { | ||
153 | - name: '海南', | ||
154 | - value: '219', | ||
155 | - height: 2.19 | ||
156 | - }, | ||
157 | - { | ||
158 | - name: '台湾', | ||
159 | - value: '242', | ||
160 | - height: 2.42 | ||
161 | - } | ||
162 | -] |