张延森 преди 3 години
родител
ревизия
7b590d60ce
променени са 5 файла, в които са добавени 809 реда и са изтрити 18 реда
  1. 14
    14
      src/components/AMap/loader.js
  2. 740
    0
      src/components/GeoMap/geoData.js
  3. 24
    0
      src/components/GeoMap/geoPolygon.js
  4. 27
    0
      src/components/GeoMap/index.jsx
  5. 4
    4
      src/pages/MonitoringScreen/index.jsx

+ 14
- 14
src/components/AMap/loader.js Целия файл

@@ -1,19 +1,19 @@
1 1
 import AMapLoader from '@amap/amap-jsapi-loader';
2 2
 
3
-const WEB_KEY = '29259f677b42900507074fd92ecb628a'
4
-const SERVER_KEY = '3be0a9567a794d2690d378476f057a6f'
3
+const WEB_KEY = '29259f677b42900507074fd92ecb628a';
4
+const SERVER_KEY = '3be0a9567a794d2690d378476f057a6f';
5 5
 
6 6
 export default (plugins, uiPlugins) => {
7 7
   return AMapLoader.load({
8
-    "key": WEB_KEY,              // 申请好的Web端开发者Key,首次调用 load 时必填
9
-    "version": "1.4.15",   // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
10
-    "plugins": plugins || [],           // 需要使用的的插件列表,如比例尺'AMap.Scale'等
11
-    "AMapUI": {             // 是否加载 AMapUI,缺省不加载
12
-      "version": '1.1',   // AMapUI 缺省 1.1
13
-      "plugins": uiPlugins || [],       // 需要加载的 AMapUI ui插件
14
-    },
15
-    "Loca": {                // 是否加载 Loca, 缺省不加载
16
-      "version": '1.3.2'  // Loca 版本,缺省 1.3.2
17
-    },
18
-  })
19
-}
8
+    key: WEB_KEY, // 申请好的Web端开发者Key,首次调用 load 时必填
9
+    version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
10
+    plugins: plugins || [], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
11
+    // "AMapUI": {             // 是否加载 AMapUI,缺省不加载
12
+    //   "version": '1.1',   // AMapUI 缺省 1.1
13
+    //   "plugins": uiPlugins || [],       // 需要加载的 AMapUI ui插件
14
+    // },
15
+    // "Loca": {                // 是否加载 Loca, 缺省不加载
16
+    //   "version": '1.3.2'  // Loca 版本,缺省 1.3.2
17
+    // },
18
+  });
19
+};

+ 740
- 0
src/components/GeoMap/geoData.js Целия файл

@@ -0,0 +1,740 @@
1
+export default {
2
+  type: 'FeatureCollection',
3
+  features: [
4
+    {
5
+      type: 'Feature',
6
+      properties: {
7
+        adcode: 411381,
8
+        name: '邓州市',
9
+        center: [112.092716, 32.681642],
10
+        centroid: [112.050009, 32.680192],
11
+        childrenNum: 0,
12
+        level: 'district',
13
+        acroutes: [100000, 410000, 411300],
14
+        parent: {
15
+          adcode: 411300,
16
+        },
17
+      },
18
+      geometry: {
19
+        type: 'MultiPolygon',
20
+        coordinates: [
21
+          [
22
+            [
23
+              [112.348727, 32.808115],
24
+              [112.348381, 32.809917],
25
+              [112.347113, 32.811663],
26
+              [112.345471, 32.811496],
27
+              [112.3454, 32.81227],
28
+              [112.343637, 32.812257],
29
+              [112.343347, 32.813248],
30
+              [112.342568, 32.813143],
31
+              [112.342314, 32.818839],
32
+              [112.334647, 32.823594],
33
+              [112.326682, 32.83202],
34
+              [112.324721, 32.838878],
35
+              [112.324842, 32.844493],
36
+              [112.330491, 32.846275],
37
+              [112.331121, 32.848051],
38
+              [112.330257, 32.850069],
39
+              [112.325783, 32.85153],
40
+              [112.323829, 32.852582],
41
+              [112.323164, 32.853851],
42
+              [112.322803, 32.857471],
43
+              [112.320849, 32.858802],
44
+              [112.317366, 32.858313],
45
+              [112.313274, 32.857477],
46
+              [112.309671, 32.857335],
47
+              [112.306131, 32.857873],
48
+              [112.302358, 32.860367],
49
+              [112.301423, 32.861921],
50
+              [112.301246, 32.863988],
51
+              [112.301515, 32.869439],
52
+              [112.299392, 32.869093],
53
+              [112.292518, 32.868858],
54
+              [112.288093, 32.869124],
55
+              [112.286061, 32.869767],
56
+              [112.283845, 32.872366],
57
+              [112.283053, 32.874204],
58
+              [112.282961, 32.877824],
59
+              [112.281969, 32.879556],
60
+              [112.279796, 32.880484],
61
+              [112.27775, 32.880045],
62
+              [112.276249, 32.879086],
63
+              [112.275966, 32.878281],
64
+              [112.27654, 32.875107],
65
+              [112.269397, 32.875627],
66
+              [112.258799, 32.87442],
67
+              [112.252555, 32.870949],
68
+              [112.243359, 32.864248],
69
+              [112.233327, 32.859841],
70
+              [112.216493, 32.859761],
71
+              [112.202943, 32.85489],
72
+              [112.18419, 32.856636],
73
+              [112.17985, 32.85731],
74
+              [112.171978, 32.856586],
75
+              [112.166591, 32.851982],
76
+              [112.157657, 32.849419],
77
+              [112.149749, 32.852817],
78
+              [112.145063, 32.860813],
79
+              [112.146599, 32.870442],
80
+              [112.140624, 32.86973],
81
+              [112.130061, 32.866463],
82
+              [112.126026, 32.86663],
83
+              [112.124766, 32.865788],
84
+              [112.124058, 32.863994],
85
+              [112.121495, 32.863338],
86
+              [112.118338, 32.863066],
87
+              [112.11545, 32.863449],
88
+              [112.114197, 32.863938],
89
+              [112.113106, 32.8659],
90
+              [112.111145, 32.872385],
91
+              [112.106891, 32.877502],
92
+              [112.105149, 32.881152],
93
+              [112.103408, 32.882569],
94
+              [112.101716, 32.885625],
95
+              [112.1003, 32.887259],
96
+              [112.099592, 32.887203],
97
+              [112.096541, 32.885403],
98
+              [112.090382, 32.885186],
99
+              [112.084287, 32.885242],
100
+              [112.084336, 32.88453],
101
+              [112.079812, 32.884153],
102
+              [112.07943, 32.885297],
103
+              [112.074036, 32.885242],
104
+              [112.074036, 32.882625],
105
+              [112.069731, 32.881919],
106
+              [112.068266, 32.882408],
107
+              [112.060281, 32.883194],
108
+              [112.058022, 32.881957],
109
+              [112.052408, 32.87968],
110
+              [112.0525, 32.877626],
111
+              [112.051085, 32.876481],
112
+              [112.049938, 32.874959],
113
+              [112.050681, 32.871073],
114
+              [112.048295, 32.869446],
115
+              [112.045711, 32.869347],
116
+              [112.045888, 32.872651],
117
+              [112.042575, 32.874278],
118
+              [112.041867, 32.874006],
119
+              [112.033471, 32.865956],
120
+              [112.031156, 32.866302],
121
+              [112.032657, 32.868536],
122
+              [112.032048, 32.870887],
123
+              [112.036126, 32.872577],
124
+              [112.034682, 32.874693],
125
+              [112.039828, 32.878677],
126
+              [112.039489, 32.880094],
127
+              [112.039375, 32.882965],
128
+              [112.039878, 32.885198],
129
+              [112.040848, 32.886405],
130
+              [112.042101, 32.889325],
131
+              [112.042044, 32.891162],
132
+              [112.041039, 32.89214],
133
+              [112.037698, 32.893068],
134
+              [112.036622, 32.893655],
135
+              [112.034307, 32.894014],
136
+              [112.032268, 32.89488],
137
+              [112.030654, 32.897175],
138
+              [112.030342, 32.899984],
139
+              [112.031107, 32.901648],
140
+              [112.032622, 32.903126],
141
+              [112.032431, 32.904227],
142
+              [112.03122, 32.906349],
143
+              [112.029493, 32.911006],
144
+              [112.028346, 32.912447],
145
+              [112.024459, 32.9139],
146
+              [112.021521, 32.913103],
147
+              [112.019879, 32.910579],
148
+              [112.014102, 32.91001],
149
+              [112.013493, 32.912255],
150
+              [112.012276, 32.912305],
151
+              [112.010492, 32.907351],
152
+              [112.00897, 32.905006],
153
+              [112.007667, 32.904437],
154
+              [112.005968, 32.904493],
155
+              [112.003589, 32.905483],
156
+              [112.00143, 32.907728],
157
+              [112.000099, 32.908148],
158
+              [111.996609, 32.906992],
159
+              [111.995505, 32.907573],
160
+              [111.995108, 32.91006],
161
+              [111.993416, 32.909491],
162
+              [111.991512, 32.913492],
163
+              [111.994556, 32.914408],
164
+              [111.994124, 32.915607],
165
+              [111.992121, 32.91664],
166
+              [111.983123, 32.913536],
167
+              [111.980029, 32.91985],
168
+              [111.990507, 32.921446],
169
+              [111.991399, 32.922738],
170
+              [111.993721, 32.924989],
171
+              [111.99411, 32.932638],
172
+              [111.996503, 32.938389],
173
+              [111.997275, 32.94344],
174
+              [111.995278, 32.950519],
175
+              [111.991632, 32.958957],
176
+              [111.987222, 32.962808],
177
+              [111.983385, 32.964372],
178
+              [111.980603, 32.967549],
179
+              [111.971839, 32.969292],
180
+              [111.965531, 32.972432],
181
+              [111.956441, 32.977605],
182
+              [111.945737, 32.983001],
183
+              [111.934757, 32.98771],
184
+              [111.923515, 32.992418],
185
+              [111.91039, 32.995051],
186
+              [111.907396, 32.99594],
187
+              [111.905605, 32.995434],
188
+              [111.904514, 32.997145],
189
+              [111.897414, 32.994952],
190
+              [111.898745, 32.993802],
191
+              [111.899637, 32.994284],
192
+              [111.901116, 32.990138],
193
+              [111.899672, 32.989798],
194
+              [111.896274, 32.987648],
195
+              [111.895396, 32.985547],
196
+              [111.896897, 32.98368],
197
+              [111.900352, 32.980312],
198
+              [111.902405, 32.977593],
199
+              [111.904734, 32.975331],
200
+              [111.906072, 32.973681],
201
+              [111.906943, 32.97179],
202
+              [111.907289, 32.968835],
203
+              [111.907806, 32.967413],
204
+              [111.90942, 32.965745],
205
+              [111.91102, 32.964725],
206
+              [111.910192, 32.95973],
207
+              [111.909519, 32.95845],
208
+              [111.907608, 32.956528],
209
+              [111.905208, 32.954587],
210
+              [111.9013, 32.951836],
211
+              [111.897923, 32.951193],
212
+              [111.893195, 32.951521],
213
+              [111.886462, 32.953184],
214
+              [111.884395, 32.953511],
215
+              [111.875001, 32.94893],
216
+              [111.861458, 32.945623],
217
+              [111.849027, 32.939347],
218
+              [111.842294, 32.933795],
219
+              [111.834507, 32.926869],
220
+              [111.824801, 32.921297],
221
+              [111.818033, 32.918724],
222
+              [111.811591, 32.913177],
223
+              [111.809538, 32.903992],
224
+              [111.809623, 32.897348],
225
+              [111.808781, 32.894769],
226
+              [111.807032, 32.890698],
227
+              [111.805291, 32.87817],
228
+              [111.798905, 32.876722],
229
+              [111.793666, 32.878479],
230
+              [111.794027, 32.876172],
231
+              [111.795896, 32.872892],
232
+              [111.796753, 32.868814],
233
+              [111.798912, 32.857273],
234
+              [111.798502, 32.851425],
235
+              [111.799047, 32.845415],
236
+              [111.805022, 32.839491],
237
+              [111.806912, 32.838006],
238
+              [111.811662, 32.83553],
239
+              [111.813757, 32.833982],
240
+              [111.816752, 32.827216],
241
+              [111.819272, 32.82365],
242
+              [111.823237, 32.821978],
243
+              [111.825722, 32.821285],
244
+              [111.827187, 32.819941],
245
+              [111.832886, 32.817093],
246
+              [111.833091, 32.815217],
247
+              [111.827753, 32.813917],
248
+              [111.827767, 32.813081],
249
+              [111.831052, 32.810406],
250
+              [111.834026, 32.80848],
251
+              [111.838599, 32.797662],
252
+              [111.840022, 32.792175],
253
+              [111.840907, 32.786223],
254
+              [111.841098, 32.771791],
255
+              [111.84073, 32.757808],
256
+              [111.842754, 32.75883],
257
+              [111.842761, 32.757957],
258
+              [111.843731, 32.758068],
259
+              [111.843979, 32.755094],
260
+              [111.845168, 32.751953],
261
+              [111.841077, 32.748929],
262
+              [111.838436, 32.747963],
263
+              [111.837955, 32.747318],
264
+              [111.835583, 32.746414],
265
+              [111.835293, 32.745645],
266
+              [111.834082, 32.745465],
267
+              [111.83404, 32.743817],
268
+              [111.832206, 32.743421],
269
+              [111.831909, 32.742503],
270
+              [111.82759, 32.742491],
271
+              [111.82752, 32.741109],
272
+              [111.82512, 32.741016],
273
+              [111.825573, 32.736877],
274
+              [111.826982, 32.737267],
275
+              [111.849112, 32.719839],
276
+              [111.870378, 32.710696],
277
+              [111.87917, 32.69033],
278
+              [111.879999, 32.688173],
279
+              [111.879121, 32.685661],
280
+              [111.880714, 32.683349],
281
+              [111.878753, 32.680633],
282
+              [111.873825, 32.67796],
283
+              [111.868148, 32.678053],
284
+              [111.862435, 32.677228],
285
+              [111.856156, 32.674357],
286
+              [111.851448, 32.669166],
287
+              [111.847059, 32.667175],
288
+              [111.840836, 32.666592],
289
+              [111.837041, 32.665966],
290
+              [111.830762, 32.663783],
291
+              [111.818748, 32.661767],
292
+              [111.815846, 32.663107],
293
+              [111.81317, 32.66743],
294
+              [111.808193, 32.670214],
295
+              [111.807436, 32.670332],
296
+              [111.80282, 32.666865],
297
+              [111.799068, 32.662363],
298
+              [111.796328, 32.657959],
299
+              [111.794417, 32.657345],
300
+              [111.788003, 32.658294],
301
+              [111.777306, 32.659044],
302
+              [111.770758, 32.660986],
303
+              [111.761321, 32.661271],
304
+              [111.755509, 32.662257],
305
+              [111.745308, 32.663845],
306
+              [111.729351, 32.665966],
307
+              [111.724254, 32.66627],
308
+              [111.722618, 32.664217],
309
+              [111.721096, 32.660204],
310
+              [111.720261, 32.645522],
311
+              [111.720176, 32.642085],
312
+              [111.714782, 32.637227],
313
+              [111.710017, 32.634665],
314
+              [111.705055, 32.634156],
315
+              [111.69978, 32.6375],
316
+              [111.691922, 32.641756],
317
+              [111.68405, 32.643326],
318
+              [111.672426, 32.642029],
319
+              [111.656582, 32.638505],
320
+              [111.653531, 32.638456],
321
+              [111.649631, 32.63456],
322
+              [111.643316, 32.627716],
323
+              [111.640803, 32.617341],
324
+              [111.641709, 32.611632],
325
+              [111.646402, 32.606189],
326
+              [111.65506, 32.608815],
327
+              [111.658522, 32.614586],
328
+              [111.662734, 32.610689],
329
+              [111.673006, 32.614977],
330
+              [111.682988, 32.61],
331
+              [111.692121, 32.605929],
332
+              [111.699157, 32.60794],
333
+              [111.704311, 32.606897],
334
+              [111.713571, 32.606549],
335
+              [111.724501, 32.600349],
336
+              [111.729237, 32.594006],
337
+              [111.740324, 32.589264],
338
+              [111.747375, 32.577599],
339
+              [111.757519, 32.570143],
340
+              [111.766807, 32.565188],
341
+              [111.775501, 32.562978],
342
+              [111.785058, 32.557333],
343
+              [111.789709, 32.553477],
344
+              [111.803117, 32.54305],
345
+              [111.809135, 32.536697],
346
+              [111.818862, 32.537125],
347
+              [111.821785, 32.535833],
348
+              [111.823768, 32.538076],
349
+              [111.827038, 32.538076],
350
+              [111.827208, 32.532566],
351
+              [111.828242, 32.531274],
352
+              [111.858272, 32.528697],
353
+              [111.862145, 32.524392],
354
+              [111.862746, 32.513632],
355
+              [111.870236, 32.50632],
356
+              [111.889924, 32.503164],
357
+              [111.898554, 32.504151],
358
+              [111.915324, 32.50773],
359
+              [111.925582, 32.511942],
360
+              [111.932322, 32.51521],
361
+              [111.941525, 32.516906],
362
+              [111.948668, 32.516981],
363
+              [111.950509, 32.516428],
364
+              [111.952866, 32.514819],
365
+              [111.953333, 32.513266],
366
+              [111.956441, 32.512278],
367
+              [111.957177, 32.511122],
368
+              [111.958154, 32.506941],
369
+              [111.96146, 32.504182],
370
+              [111.962579, 32.500268],
371
+              [111.963846, 32.498311],
372
+              [111.966805, 32.494924],
373
+              [111.968065, 32.492103],
374
+              [111.970111, 32.485224],
375
+              [111.970295, 32.482813],
376
+              [111.970961, 32.481775],
377
+              [111.973658, 32.479817],
378
+              [111.97426, 32.478207],
379
+              [111.974345, 32.473447],
380
+              [111.975555, 32.471899],
381
+              [111.977382, 32.471141],
382
+              [111.983003, 32.469811],
383
+              [111.99285, 32.467337],
384
+              [111.991739, 32.46403],
385
+              [111.988914, 32.462743],
386
+              [111.988192, 32.461985],
387
+              [111.98805, 32.460704],
388
+              [111.989346, 32.460487],
389
+              [111.989091, 32.459262],
390
+              [111.990287, 32.458448],
391
+              [111.990429, 32.457484],
392
+              [111.99457, 32.458174],
393
+              [111.998514, 32.459436],
394
+              [112.000071, 32.459542],
395
+              [112.00211, 32.45902],
396
+              [112.004729, 32.456371],
397
+              [112.005911, 32.452355],
398
+              [112.007051, 32.451031],
399
+              [112.00977, 32.451479],
400
+              [112.011929, 32.45049],
401
+              [112.014371, 32.450316],
402
+              [112.017741, 32.452324],
403
+              [112.019086, 32.453667],
404
+              [112.023107, 32.457049],
405
+              [112.027121, 32.459971],
406
+              [112.031142, 32.461767],
407
+              [112.033818, 32.463334],
408
+              [112.036508, 32.466715],
409
+              [112.038122, 32.470096],
410
+              [112.043467, 32.471433],
411
+              [112.047984, 32.473739],
412
+              [112.049902, 32.473273],
413
+              [112.05403, 32.471712],
414
+              [112.05735, 32.471576],
415
+              [112.059247, 32.472079],
416
+              [112.064018, 32.474242],
417
+              [112.064479, 32.47303],
418
+              [112.064592, 32.470849],
419
+              [112.065116, 32.469015],
420
+              [112.066638, 32.465341],
421
+              [112.068917, 32.462575],
422
+              [112.069781, 32.461021],
423
+              [112.069838, 32.459989],
424
+              [112.068847, 32.455638],
425
+              [112.068889, 32.453456],
426
+              [112.067919, 32.45128],
427
+              [112.066461, 32.447046],
428
+              [112.065958, 32.44464],
429
+              [112.066418, 32.442296],
430
+              [112.067409, 32.440617],
431
+              [112.070185, 32.439921],
432
+              [112.072478, 32.43905],
433
+              [112.075168, 32.436911],
434
+              [112.076719, 32.436439],
435
+              [112.081646, 32.43578],
436
+              [112.083614, 32.436228],
437
+              [112.086042, 32.435295],
438
+              [112.086771, 32.433852],
439
+              [112.086672, 32.430706],
440
+              [112.085235, 32.42968],
441
+              [112.0836, 32.427796],
442
+              [112.081342, 32.425694],
443
+              [112.080442, 32.423635],
444
+              [112.080839, 32.422485],
445
+              [112.0844, 32.419705],
446
+              [112.087168, 32.419288],
447
+              [112.09143, 32.419388],
448
+              [112.09366, 32.418909],
449
+              [112.094934, 32.418038],
450
+              [112.099231, 32.415824],
451
+              [112.105333, 32.410774],
452
+              [112.108448, 32.404759],
453
+              [112.115039, 32.401413],
454
+              [112.121644, 32.399136],
455
+              [112.124405, 32.398757],
456
+              [112.127046, 32.400946],
457
+              [112.128171, 32.403067],
458
+              [112.130245, 32.403111],
459
+              [112.131895, 32.399864],
460
+              [112.13273, 32.396586],
461
+              [112.13467, 32.39439],
462
+              [112.135654, 32.392312],
463
+              [112.137396, 32.390583],
464
+              [112.140291, 32.389749],
465
+              [112.14216, 32.388362],
466
+              [112.142946, 32.386234],
467
+              [112.145544, 32.383235],
468
+              [112.14708, 32.38219],
469
+              [112.152446, 32.379614],
470
+              [112.155795, 32.377461],
471
+              [112.156871, 32.377101],
472
+              [112.159787, 32.378227],
473
+              [112.160736, 32.379017],
474
+              [112.161777, 32.381468],
475
+              [112.163072, 32.383347],
476
+              [112.16446, 32.384411],
477
+              [112.164092, 32.385624],
478
+              [112.161614, 32.387024],
479
+              [112.161111, 32.387939],
480
+              [112.159922, 32.388499],
481
+              [112.159745, 32.386949],
482
+              [112.159115, 32.386452],
483
+              [112.153444, 32.385301],
484
+              [112.151908, 32.384312],
485
+              [112.150634, 32.384181],
486
+              [112.149919, 32.385046],
487
+              [112.149487, 32.387024],
488
+              [112.153331, 32.388343],
489
+              [112.155151, 32.389376],
490
+              [112.155349, 32.390104],
491
+              [112.154032, 32.392368],
492
+              [112.154032, 32.393743],
493
+              [112.154747, 32.3949],
494
+              [112.156382, 32.396132],
495
+              [112.157579, 32.395528],
496
+              [112.156043, 32.391634],
497
+              [112.157465, 32.391696],
498
+              [112.158542, 32.391105],
499
+              [112.159724, 32.392629],
500
+              [112.161373, 32.39345],
501
+              [112.159724, 32.394377],
502
+              [112.159858, 32.395671],
503
+              [112.161713, 32.399292],
504
+              [112.161437, 32.400107],
505
+              [112.159306, 32.401649],
506
+              [112.158067, 32.401811],
507
+              [112.15675, 32.401189],
508
+              [112.155653, 32.401288],
509
+              [112.154867, 32.402501],
510
+              [112.152616, 32.40112],
511
+              [112.150931, 32.401058],
512
+              [112.148723, 32.40173],
513
+              [112.146924, 32.402682],
514
+              [112.14616, 32.40545],
515
+              [112.144418, 32.406053],
516
+              [112.143625, 32.407011],
517
+              [112.145693, 32.407446],
518
+              [112.145877, 32.408628],
519
+              [112.149232, 32.410451],
520
+              [112.150216, 32.411638],
521
+              [112.1512, 32.41124],
522
+              [112.153402, 32.411483],
523
+              [112.154584, 32.410992],
524
+              [112.156531, 32.409437],
525
+              [112.159731, 32.410892],
526
+              [112.160255, 32.410444],
527
+              [112.160007, 32.408746],
528
+              [112.161394, 32.408703],
529
+              [112.163313, 32.409698],
530
+              [112.164665, 32.41129],
531
+              [112.169146, 32.40971],
532
+              [112.169118, 32.408149],
533
+              [112.170222, 32.406644],
534
+              [112.171893, 32.406656],
535
+              [112.173486, 32.408529],
536
+              [112.174343, 32.407409],
537
+              [112.172481, 32.405898],
538
+              [112.172573, 32.401295],
539
+              [112.171468, 32.399852],
540
+              [112.172169, 32.398352],
541
+              [112.173005, 32.398035],
542
+              [112.17527, 32.398446],
543
+              [112.177507, 32.398327],
544
+              [112.177514, 32.397444],
545
+              [112.176403, 32.3963],
546
+              [112.176757, 32.395354],
547
+              [112.17801, 32.395068],
548
+              [112.179036, 32.392859],
549
+              [112.178824, 32.392125],
550
+              [112.176714, 32.391174],
551
+              [112.175256, 32.391292],
552
+              [112.175079, 32.389239],
553
+              [112.174265, 32.388163],
554
+              [112.172382, 32.387783],
555
+              [112.172764, 32.38517],
556
+              [112.174704, 32.385817],
557
+              [112.181344, 32.387111],
558
+              [112.183737, 32.388455],
559
+              [112.188791, 32.389768],
560
+              [112.191446, 32.389749],
561
+              [112.194235, 32.391435],
562
+              [112.205895, 32.392978],
563
+              [112.208437, 32.391877],
564
+              [112.213732, 32.390035],
565
+              [112.216365, 32.38866],
566
+              [112.220344, 32.387509],
567
+              [112.22273, 32.387043],
568
+              [112.225356, 32.386097],
569
+              [112.226892, 32.386153],
570
+              [112.22685, 32.387472],
571
+              [112.228414, 32.387447],
572
+              [112.229172, 32.39238],
573
+              [112.228967, 32.393755],
574
+              [112.228004, 32.395777],
575
+              [112.224818, 32.400996],
576
+              [112.223742, 32.402234],
577
+              [112.228138, 32.403273],
578
+              [112.227119, 32.405524],
579
+              [112.235529, 32.407913],
580
+              [112.234842, 32.409673],
581
+              [112.237618, 32.409605],
582
+              [112.237554, 32.41088],
583
+              [112.244414, 32.411439],
584
+              [112.244789, 32.408429],
585
+              [112.248654, 32.409088],
586
+              [112.24859, 32.40976],
587
+              [112.255939, 32.409387],
588
+              [112.258325, 32.409617],
589
+              [112.256725, 32.41417],
590
+              [112.257808, 32.415041],
591
+              [112.258105, 32.416807],
592
+              [112.257779, 32.419655],
593
+              [112.262169, 32.419817],
594
+              [112.262204, 32.42501],
595
+              [112.265956, 32.425613],
596
+              [112.266352, 32.427541],
597
+              [112.273899, 32.432403],
598
+              [112.282281, 32.435432],
599
+              [112.289028, 32.438684],
600
+              [112.295477, 32.446741],
601
+              [112.293728, 32.448756],
602
+              [112.293664, 32.45118],
603
+              [112.292751, 32.453878],
604
+              [112.292808, 32.459529],
605
+              [112.291774, 32.459256],
606
+              [112.291201, 32.462308],
607
+              [112.28975, 32.462936],
608
+              [112.289205, 32.469767],
609
+              [112.290281, 32.470289],
610
+              [112.289842, 32.471078],
611
+              [112.290727, 32.471526],
612
+              [112.28999, 32.473005],
613
+              [112.289849, 32.474596],
614
+              [112.288348, 32.475255],
615
+              [112.287937, 32.476107],
616
+              [112.28781, 32.478437],
617
+              [112.287045, 32.479525],
618
+              [112.282798, 32.479718],
619
+              [112.282776, 32.481992],
620
+              [112.286599, 32.482123],
621
+              [112.286649, 32.484143],
622
+              [112.285537, 32.484404],
623
+              [112.285629, 32.486193],
624
+              [112.284985, 32.489704],
625
+              [112.285254, 32.495757],
626
+              [112.28604, 32.501113],
627
+              [112.288893, 32.50074],
628
+              [112.289523, 32.505872],
629
+              [112.28529, 32.507059],
630
+              [112.284171, 32.508494],
631
+              [112.280837, 32.518323],
632
+              [112.282125, 32.525889],
633
+              [112.284539, 32.530715],
634
+              [112.287774, 32.534399],
635
+              [112.290981, 32.541287],
636
+              [112.293601, 32.553446],
637
+              [112.29651, 32.565151],
638
+              [112.299427, 32.573868],
639
+              [112.300185, 32.580014],
640
+              [112.300942, 32.581696],
641
+              [112.302018, 32.582801],
642
+              [112.303781, 32.582392],
643
+              [112.303866, 32.583391],
644
+              [112.301388, 32.58372],
645
+              [112.298365, 32.584887],
646
+              [112.294889, 32.585421],
647
+              [112.293537, 32.586085],
648
+              [112.289516, 32.586855],
649
+              [112.287428, 32.587041],
650
+              [112.287173, 32.588723],
651
+              [112.278989, 32.590257],
652
+              [112.280072, 32.594136],
653
+              [112.276823, 32.594695],
654
+              [112.272427, 32.595949],
655
+              [112.273396, 32.599083],
656
+              [112.274359, 32.601255],
657
+              [112.264434, 32.603781],
658
+              [112.265333, 32.606773],
659
+              [112.261206, 32.607561],
660
+              [112.255365, 32.609112],
661
+              [112.254707, 32.609981],
662
+              [112.254686, 32.611638],
663
+              [112.255316, 32.614009],
664
+              [112.255238, 32.617254],
665
+              [112.253277, 32.617534],
666
+              [112.249709, 32.618551],
667
+              [112.249957, 32.619513],
668
+              [112.251104, 32.619426],
669
+              [112.251635, 32.62104],
670
+              [112.253199, 32.620953],
671
+              [112.253298, 32.622523],
672
+              [112.252059, 32.622585],
673
+              [112.252166, 32.623733],
674
+              [112.24898, 32.624086],
675
+              [112.248661, 32.622758],
676
+              [112.247989, 32.623149],
677
+              [112.249072, 32.626475],
678
+              [112.248817, 32.627139],
679
+              [112.249497, 32.628926],
680
+              [112.253157, 32.627753],
681
+              [112.253688, 32.628039],
682
+              [112.253879, 32.631011],
683
+              [112.256137, 32.631737],
684
+              [112.257744, 32.633449],
685
+              [112.264165, 32.638232],
686
+              [112.265248, 32.640273],
687
+              [112.265128, 32.642283],
688
+              [112.276334, 32.644945],
689
+              [112.279527, 32.644839],
690
+              [112.283222, 32.645007],
691
+              [112.284072, 32.647867],
692
+              [112.281481, 32.648394],
693
+              [112.280816, 32.647947],
694
+              [112.280327, 32.648934],
695
+              [112.274232, 32.652041],
696
+              [112.274465, 32.655062],
697
+              [112.274805, 32.655242],
698
+              [112.277955, 32.654076],
699
+              [112.2794, 32.656129],
700
+              [112.280851, 32.657121],
701
+              [112.283258, 32.656942],
702
+              [112.283258, 32.656464],
703
+              [112.292886, 32.657946],
704
+              [112.294967, 32.661345],
705
+              [112.296291, 32.667994],
706
+              [112.301105, 32.677191],
707
+              [112.304361, 32.680192],
708
+              [112.308418, 32.682282],
709
+              [112.313557, 32.685748],
710
+              [112.315179, 32.688284],
711
+              [112.315971, 32.691955],
712
+              [112.314018, 32.69813],
713
+              [112.311002, 32.702457],
714
+              [112.312857, 32.708427],
715
+              [112.318258, 32.713963],
716
+              [112.323688, 32.716976],
717
+              [112.327468, 32.720211],
718
+              [112.328247, 32.726403],
719
+              [112.327419, 32.729149],
720
+              [112.31566, 32.735024],
721
+              [112.315051, 32.742578],
722
+              [112.315554, 32.74831],
723
+              [112.318265, 32.753372],
724
+              [112.321762, 32.757288],
725
+              [112.327157, 32.764202],
726
+              [112.333627, 32.773866],
727
+              [112.33876, 32.781002],
728
+              [112.343078, 32.787908],
729
+              [112.345478, 32.794113],
730
+              [112.345974, 32.802362],
731
+              [112.3454, 32.805793],
732
+              [112.34848, 32.806195],
733
+              [112.348727, 32.808115],
734
+            ],
735
+          ],
736
+        ],
737
+      },
738
+    },
739
+  ],
740
+};

+ 24
- 0
src/components/GeoMap/geoPolygon.js Целия файл

@@ -0,0 +1,24 @@
1
+import geoData from './geoData';
2
+
3
+export default (AMap, map) => {
4
+  const outer = [
5
+    new AMap.LngLat(-360, 90, true),
6
+    new AMap.LngLat(-360, -90, true),
7
+    new AMap.LngLat(360, -90, true),
8
+    new AMap.LngLat(360, 90, true),
9
+  ];
10
+
11
+  const holes = geoData.features[0].geometry.coordinates[0][0];
12
+  const pathArray = [outer, holes];
13
+
14
+  const polygon = new AMap.Polygon({
15
+    pathL: pathArray,
16
+    strokeColor: '#3D81F0',
17
+    strokeWeight: 1,
18
+    strokeOpacity: 0.1,
19
+    fillColor: '#3D81F0',
20
+    fillOpacity: 0.5,
21
+  });
22
+  polygon.setPath(pathArray);
23
+  map.add(polygon);
24
+};

+ 27
- 0
src/components/GeoMap/index.jsx Целия файл

@@ -0,0 +1,27 @@
1
+import React, { useEffect, useRef } from 'react';
2
+import loader from '@/components/AMap/loader';
3
+import geoPolygon from './geoPolygon';
4
+
5
+const plugins = [];
6
+
7
+export default (props) => {
8
+  const container = useRef();
9
+
10
+  useEffect(() => {
11
+    loader(plugins).then((AMap) => {
12
+      const map = new AMap.Map(container.current, {
13
+        mapStyle: 'amap://styles/darkblue',
14
+        zoom: 10,
15
+        resizeEnable: true,
16
+        center: [112.092716, 32.681642],
17
+      });
18
+
19
+      map.setFeatures(['road', 'bg']); // 只显示道路
20
+
21
+      // 遮罩层;
22
+      geoPolygon(AMap, map);
23
+    });
24
+  }, []);
25
+
26
+  return <div ref={container} style={{ height: '100%' }} />;
27
+};

+ 4
- 4
src/pages/MonitoringScreen/index.jsx Целия файл

@@ -5,14 +5,14 @@ import classNames from 'classnames';
5 5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 6
 import { FullscreenOutlined } from '@ant-design/icons';
7 7
 import { Button } from 'antd';
8
+import ScreenHeader from '@/components/ScreenBox/ScreenHeader';
9
+import GeoMap from '@/components/GeoMap';
8 10
 import { useFullScreen } from './hook';
9 11
 import DateCommponetsLeft from './DateCommponetsLeft';
10 12
 import DateCommponetsBottomRight from './DateCommponetsBottomRight';
11 13
 import DateCommponetsBottomLeft from './DateCommponetsBottomLeft';
12
-import Styles from './style.less';
13
-import SquareBox from '@/components/ScreenBox/SquareBox';
14
-import ScreenHeader from '@/components/ScreenBox/ScreenHeader';
15 14
 
15
+import Styles from './style.less';
16 16
 export default (props) => {
17 17
   const screenRef = useRef();
18 18
   const [height, setHeight] = useState('auto');
@@ -51,7 +51,7 @@ export default (props) => {
51 51
               <DateCommponetsBottomLeft />
52 52
             </div>
53 53
             <div className={classNames(Styles['grail-content'], Styles['pd-lr-40'])}>
54
-              <DateCommponetsLeft />
54
+              <GeoMap></GeoMap>
55 55
             </div>
56 56
             <div className={Styles['grail-right']}>
57 57
               <DateCommponetsBottomRight />