From 343ce7975ec7557656d6f83be5cc216c2e380fe7 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 20 Jul 2022 13:30:36 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 + src/assets/img/shuju/grid/pos-green.png | Bin 0 -> 2506 bytes src/assets/img/shuju/grid/pos-red.png | Bin 0 -> 2727 bytes src/assets/img/shuju/grid/pos-yellow.png | Bin 0 -> 2348 bytes src/utils/index.js | 9 + .../fivelayers/mapIndex - 副本.vue | 1988 +++++++++++++++++ src/views/modules/visual/test/l7.vue | 480 ++++ 7 files changed, 2480 insertions(+) create mode 100644 src/assets/img/shuju/grid/pos-green.png create mode 100644 src/assets/img/shuju/grid/pos-red.png create mode 100644 src/assets/img/shuju/grid/pos-yellow.png create mode 100644 src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue create mode 100644 src/views/modules/visual/test/l7.vue diff --git a/package.json b/package.json index 6c2f6f5a..1da2b34b 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,9 @@ "et:list": "gulp themes" }, "dependencies": { + "@antv/l7": "^2.9.14", + "@antv/l7-draw": "^3.0.5", + "@antv/l7-maps": "^2.9.14", "@riophae/vue-treeselect": "^0.4.0", "@tinymce/tinymce-vue": "^3.2.8", "async-validator": "^4.2.5", diff --git a/src/assets/img/shuju/grid/pos-green.png b/src/assets/img/shuju/grid/pos-green.png new file mode 100644 index 0000000000000000000000000000000000000000..a4bf392e0443d33b9b8fe2c2014d76f064f30473 GIT binary patch literal 2506 zcmaJ@c|25mAD&Cr5K%O8jZw*DHfETaESVW2Wn>$vZZc+JFiSIs8IoixvKA^!c4dhc z61uiqA;~4Ax`ncJBicji9o=-_Ki=N+`JD4xKF{-fx95)&=j>#!sti^Jfk3Jb+sUrd z6)Jt->HHXx=8Ss+^`--iWp;L?3rt}Hq;n-`fW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90JPFCwHK`k8VmgQC%LI!)UA%CGY-eeYErB zb(V3G$W5V~o|iqO&yBH2mqu3IGxjH3%UzN`9vrx%9CH4Tet~&d)TGl7T2}oFvJJOX z&P+r4bLlpVJ4Y@b&HveXvXiv7aLg_nGIZ9-aqUlcqL*$#zV6~OEjQcSVU-+{?Fiyn z&K=H4&#iIKQ2Uz13nK%{3iD-;vut6LagmhB#8t`zQ}x-|C3@I)rkC!djd>qZ=P8yU zB=6UziHDpk`h64~$h_dOIQjkNB}x+x!=X86^YijiaxoZtjQ`h6^FmSN_?k^iGdMh1R24>@~Z3V4^yC zPbuezHCI<}Le0yM9zHGKx$neGoK+xws><(L$als!3|VIgRL4}a@Ug8-!{W|kcoV2; zT3^d(^74E6Z?^1N?bsA&7PrdnEmZRATJms&&(%TQ3qGvd(LOCS^F4>H+GZP{Z>i*n zCo?mkqbnlm;TYqJ&|kv&QMu4=h?$<*tLFFpb>1`Ydyb>K2#xD?X6m0p9U6wKjB2ud z-drG&Y@2hc;o}{)S2ijue?77)#F+I+jDKibIC}%)U%g=$jJ@jw{PEg=oZpwV(c=HT z12&*%+>yH6LtpEUI5}X_>D1)rXrap{*w_aRMh*8CKDww4O)Fm4ru7Yeqid~Q+;}bL zlzpXg>CE0pC-4v))|lU@)Ycs_IZz;Xwj5jLjqlh*elh>8as1v3RjLG=!!NWIvY=L* zc>4B`9@%$5 zU-ZOLR5T{=8~o`jhRJg>^#O33Q?4}{a9{At4tDZ@|MS+S*W*bAkCo0wTkp(v?9ejM Y_^s)KZ%yV@#Nw}`FFAnJKw$3t4^mu(sQ>@~ literal 0 HcmV?d00001 diff --git a/src/assets/img/shuju/grid/pos-yellow.png b/src/assets/img/shuju/grid/pos-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..91ff243b08928eb676d51d3e758d76cec7265c6b GIT binary patch literal 2348 zcmaJ@dpwkB8y+c1CmL;qGR8FV$sCCpO%5}|3}%QCI>?xL#|+K9W8T+cNac{6Qdn#{ zij+2o4vM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+S@1BPQmZM!1AC&G84JO$Gag9EZ%$ z(BR-W_v9n16Zc)F_?j2larmZ;s($1Ol>xNd2Jj_zfU%|zfm1`bJ z+@3IXzVl{nc0izS1k3mJIb}nuC-}TLHJUP-MeKIDlXISsG+va6N%K||rs-5;k2w~* zAIy5k$`fR3w_2c0eBWzGI>@Z((DfmWL7j=%gPWQ#FE6pE7*a~_l6U?O;$AEZye%@$ zIKxOPL+CxeDVa92)E%bvp4_R*IBB)1XlAX<5Eu|^WJja zyvfIYifF_eLsRY3x$Q}qoBBQu^Q#^DyrW9Y9!$kfIsIOp#YbY3cZnTbW9H`siQoTBXZH6gubwx0$xX}gaEP=&Y7=m+ zF~zj_hnCa)I1Ex$YaEsB4*y&pc2}v{JKV3`Ai*khR#&>fG~9K~-S_(vwf$3qk081# zaQ(@sSEW`d+mh+mV>3!etZ%P7rZI$ptHA1PyChW`^buV6ZcX6T?l796i83|J?}B|9 z=9c3Yk>%yy)RD8{e_Z|8D^I}o)jHcTG9>3f#j~;Hl0Wa)7(_gmiZf-#!iP^7V z)2BZ5hV;XiF3ePPzD->+l|DGiOg(;Y>#4x^>#9yRn6eTRMD}GKhqlR}eR{u@wRl+7 zcj(|Ty~sWzdvv1rfK>kGh_la0|CP0OIuNIQ^O}!YXWzS-OEBwfOSrPC)vhDo26a1N z%}cvyZ9UhbUs=d4JeSyg*tc}m#N~5O+z!lp>3KA9EOYWlgJ9-aQ`KnO&|#@x#^c3L z+_r17lS@@ydMOwDYqk0tmZoJjn*M~I>@bc$G`XOKALv%Nf8MZeJy&-xzp(_1Y*m^|CBp@r}m&VUnh$Pu&uFKi~4QRWmF F{}&|3(E|Vg literal 0 HcmV?d00001 diff --git a/src/utils/index.js b/src/utils/index.js index c2232ac7..b2b65d7b 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -144,4 +144,13 @@ export function computedCard(idCard) { sex = '1'; return {age , sex, birth} } +// 将数组分成小块数组的集合 +export function spliceIntoChunks(arr, chunkSize) { + const res = []; + while (arr.length > 0) { + const chunk = arr.splice(0, chunkSize); + res.push(chunk); + } + return res; +} diff --git a/src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue b/src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue new file mode 100644 index 00000000..0128dd05 --- /dev/null +++ b/src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue @@ -0,0 +1,1988 @@ + + + + + + + + + + + diff --git a/src/views/modules/visual/test/l7.vue b/src/views/modules/visual/test/l7.vue new file mode 100644 index 00000000..e8551bda --- /dev/null +++ b/src/views/modules/visual/test/l7.vue @@ -0,0 +1,480 @@ + + + + + From b5ebae51f4a24833fce2949ef2eb6030484fdcd2 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 20 Jul 2022 14:40:20 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=B5=8B=E8=AF=951?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/test/l7.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/visual/test/l7.vue b/src/views/modules/visual/test/l7.vue index e8551bda..c7769087 100644 --- a/src/views/modules/visual/test/l7.vue +++ b/src/views/modules/visual/test/l7.vue @@ -386,7 +386,7 @@ export default { }) .size(8) .style({ - rotation: 0, + rotation: 50, layerType: "fillImage", }); scene.addLayer(dotLayer); From e31f95ba1c8f4edfe0b94aa68e9e270abc34197f Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 20 Jul 2022 15:04:56 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=88=A0=E6=8E=89=E4=B8=8D=E8=AF=A5?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fivelayers/mapIndex - 副本.vue | 1988 ----------------- src/views/modules/visual/test/l7.vue | 2 +- 2 files changed, 1 insertion(+), 1989 deletions(-) delete mode 100644 src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue diff --git a/src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue b/src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue deleted file mode 100644 index 0128dd05..00000000 --- a/src/views/modules/visual/communityGovern/fivelayers/mapIndex - 副本.vue +++ /dev/null @@ -1,1988 +0,0 @@ - - - - - - - - - - - diff --git a/src/views/modules/visual/test/l7.vue b/src/views/modules/visual/test/l7.vue index c7769087..e8551bda 100644 --- a/src/views/modules/visual/test/l7.vue +++ b/src/views/modules/visual/test/l7.vue @@ -386,7 +386,7 @@ export default { }) .size(8) .style({ - rotation: 50, + rotation: 0, layerType: "fillImage", }); scene.addLayer(dotLayer); From f2d2b436fd0aa3f776243c95696a514287dd624a Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 20 Jul 2022 15:15:54 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=B3=A8=E9=87=8Al7-draw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/test/l7.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/visual/test/l7.vue b/src/views/modules/visual/test/l7.vue index e8551bda..9d362327 100644 --- a/src/views/modules/visual/test/l7.vue +++ b/src/views/modules/visual/test/l7.vue @@ -23,7 +23,7 @@ import { RasterLayer, } from "@antv/l7"; import { GaodeMap, Map } from "@antv/l7-maps"; -import { DrawEvent, DrawPolygon } from "@antv/l7-draw"; +// import { DrawEvent, DrawPolygon } from "@antv/l7-draw"; import { spliceIntoChunks } from "@/utils/index"; let scene; From 973b40c74332da84701dac237675737dbc0b1b85 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 20 Jul 2022 17:59:26 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/shuju/grid/pos-green2.png | Bin 0 -> 3807 bytes src/assets/img/shuju/grid/pos-red2.png | Bin 0 -> 3310 bytes src/assets/img/shuju/grid/pos-yellow2.png | Bin 0 -> 3628 bytes src/views/modules/visual/test/l7.vue | 96 ++++++++++++++++++---- 4 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 src/assets/img/shuju/grid/pos-green2.png create mode 100644 src/assets/img/shuju/grid/pos-red2.png create mode 100644 src/assets/img/shuju/grid/pos-yellow2.png diff --git a/src/assets/img/shuju/grid/pos-green2.png b/src/assets/img/shuju/grid/pos-green2.png new file mode 100644 index 0000000000000000000000000000000000000000..7162005f509e101e0bdba7e254b263f190afe1c8 GIT binary patch literal 3807 zcmV<54j}P~P)Px@nMp)JRA}DSSqXF$RThmXAhih$MuB7)Vuh&xj&_-hI^_8cb&a(!rc_ zPpYf_zwf>JZ~MQ(!rJ<8c}~Z$xp^bP;KJf7?xBgv^J?xXsq?({_msOVLk+ni+ms$laVbF#H;_}1-;pbD4 zv-;dv>E$_HJ1@*CA_(B}rTJpW_tiq@s6QiU?MK9I>-LH+i?W5EyVJs~SK8g)E{ie} zyDZ8Sz;&xiM7X_9=$uE+8XinKD7q!)3ZIN)T^D2yXg6cKF3B9w^@EJx38L5PQlWDn z77=ZL;no__{i9p~Ib9cJWQWZb9oogOR4L_|tmn_{@NTKr{cmVmsA z7iXA4ZtNu=X7;-D!}Q~SU6CWS?n6SK`g5COaMDkLWKtgBULwfCy=J+s%#+Ee4r%631uK0K>x%ZZdAv5;6Rjv!WFH1c(!d)SZ+iHR%qb4~z zqwdm{@?tFJG|5T0^V?!dVyT~o%-|l&Q*OIyZMHCGRyTzlZBA9!)^cMG<~GGWa!ZA{ zVud?BWCmZk!u`no$)zGPyDAudGiMy^d%FCX3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?pcdy zsyd3#sK^x0cmUV9XYeIIjO9{CbGeNqF6IQc+F6+bw}@)9frE(?EhR4w>3(`!M07!c zMqA|f8aDrE+EM?|=^%N)#eIhJYM|$(mEj~qu?GWqwWw1Hgt{Zb=0m=ZlOReCdUSC3 z3}sK^9TI2ciN4bhJ_PXT)L<-hKBGebbV2HFDPS`}F68T7r}7q!RvQU~l|nM%Z6o#M zX!5b6qO8jOFUQ~?!Nwu;@=l1ifEqqfz=~oUisS?tEK8coy*=r0@@7GL>#QB~Alq?* z2<*U6t|(SGhOE*H+|TkDI!(lmip!T`=6;tN1l~@fln_++q?PmiR!>W442{JcbuJnT zIgU?Nh?`}wEZ(`j6WCEJEI&t*YPATwD(s*P9`#2cSMu?HxV)LMQ5s$u+WvKpJx3+i0NC{8FTXAn2n*oLx0 z-5==yT|)PLm_B=O>EM&Z6NmB~SKRUN3!!5nWfs?PI+ajYin4qFe1^?XyE$c+`qF4F zb6_yJzbIEbwhK#Ut^$*{Euvy0zPR+2`kjOKApG)Ec+g5dVMy|_aq!`S>+_w6D^na37 VtS^drNDlx2002ovPDHLkV1h3zb6NlZ literal 0 HcmV?d00001 diff --git a/src/assets/img/shuju/grid/pos-red2.png b/src/assets/img/shuju/grid/pos-red2.png new file mode 100644 index 0000000000000000000000000000000000000000..1f2faa80dc1cd179fb7626804e9c1bb197a2be8f GIT binary patch literal 3310 zcmVPx>s7XXYRA}DqS!s|QWf>mX>7G5ZGt)gYJ@?FRvN?9MIYDA-miaCCRR!AshiT2@w)~vdB6AU?oeptH}V_#9q#WrXLPLFD__}_F8;DBRqF2YO7CIp z#MpuH4#v}6UisnGUU|`~LZRW~t7xKS0+jhR#&!(ZZ=?sD_m8dEn1@!o`NGFW(baBS zbalG4667mX?Adft)}_+&mK&EXPLphpMdYKHt%LtJ^76JDlU*@O{Ak@_jh)zpHxiCK?-c^Yi_diDa>Ze(Y*(r{7Z%-0 zi*8KBWluDG*oqDuyRk|CN+kMReWapZ;Lk|zP08GzmiIC+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vcK9+Ev0{j`z@D6Ka zt?c1S%p8gf#gSW(|KNc0G4dA1N@Zr9M7PF>gzl$xL_|0RHS*km(K3ke!5^n43?nFH zs$C5e!{Ko`Jz)$)D01$>Q-}ZzD?#u-mo+ME2gzP=C_{%SZpe@!<59T?kU=A0Y_5M$ zg3fKa1ZZ$YT^RBW=3BCiOMy%|J>d!l-d4qIl$w65KUb$3^lP5EambL{O%yo>yaxFH zFDZeuw9Lr2Dbhr=8Y4xAtl$WQu4m}-E-uLs6nf3$G*4G~%?Ar8 zgMx-$twMd2aZ_=h0^4WTdzHy;q-RmeQ~dWUsu zaYb&;Z^Ehv8YdE!-&xY^)%_L^CzdB!_~Yst1_yK$7Cvym`*L9*cV72}0MGDFS`3B= z-h;jBD(7)<%1|LPWC+S?tSzhy>vUFsYoY>^S1MQ6Sg6@};Q%%R78g(o1uKL)N(Xzpg`mVrlu{5^KlcppJ03WyED$ y;6`FzP{p4YxKZIXSc^T_OU_t_>HmLi|NAe2^FgViyI^bp0000 { + // 底图服务 + // const baseLayer = new RasterLayer({ + // zIndex: 1, + // }); + // baseLayer.source( + // "https://t1.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd", + // { + // parser: { + // type: "rasterTile", + // tileSize: 256, + // // minZoom: 6, + // // maxZoom: 15, + // zoomOffset: 0, + // }, + // } + // ); + + // // 注记服务 + // const annotionLayer = new RasterLayer({ + // zIndex: 2, + // }); + // annotionLayer.source( + // "https://t1.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd", + // { + // parser: { + // type: "rasterTile", + // tileSize: 256, + // // minZoom: 6, + // // maxZoom: 15, + // zoomOffset: 0, + // }, + // } + // ); + + // scene.addLayer(baseLayer); + // scene.addLayer(annotionLayer); + const polygon = [ ...srcMapData.children .filter((item) => item.coordinates.length > 0) @@ -235,9 +288,9 @@ export default { }) .source({ type: "FeatureCollection", features: polygon }) .shape("name", ["pos-red", "pos-green", "pos-yellow"]) - .size(14) + .size(12) .style({ - offsets: [0, 10], // 文本相对锚点的偏移量 [水平, 垂直] + offsets: [0, 8], // 文本相对锚点的偏移量 [水平, 垂直] // rotation: 60, layerType: "fillImage", }); @@ -256,7 +309,7 @@ export default { .size(16) .style({ textAnchor: "center", // 文本相对锚点的位置 center|left|right|top|bottom|top-left - textOffset: [0, 45], // 文本相对锚点的偏移量 [水平, 垂直] + textOffset: [0, 40], // 文本相对锚点的偏移量 [水平, 垂直] spacing: 2, // 字符间距 padding: [1, 1], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近 stroke: "#ffffff", // 描边颜色 @@ -312,7 +365,7 @@ export default { sweepCenter: [120.145319, 30.238915], }, }); - // scene.addLayer(pointLayer); + // scene.addLayer(pointLayer); }); // const textFeatures = [ @@ -389,6 +442,17 @@ export default { rotation: 0, layerType: "fillImage", }); + + dotLayer.on("mousemove", (e) => { + console.log(e); + const popup = new Popup({ + offsets: [0, -0], + closeButton: false, + }) + .setLnglat(e.feature.geometry.coordinates) + .setHTML(`类型: ${e.feature.properties.categoryKey}`); + scene.addPopup(popup); + }); scene.addLayer(dotLayer); }, From f77c2ec99b0cdea908907b023ff594067e0e5e93 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 22 Jul 2022 13:41:00 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visual/basicinfo/basicInfoMain.vue | 1011 +++-------------- .../visual/basicinfo/cpts/grid-map.vue | 322 ++++++ src/views/modules/visual/test/l7.vue | 55 +- 3 files changed, 535 insertions(+), 853 deletions(-) create mode 100644 src/views/modules/visual/basicinfo/cpts/grid-map.vue diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue index c57aaef3..38908c51 100644 --- a/src/views/modules/visual/basicinfo/basicInfoMain.vue +++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue @@ -1,73 +1,78 @@ - + - \ No newline at end of file + diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue new file mode 100644 index 00000000..f7eedd84 --- /dev/null +++ b/src/views/modules/visual/basicinfo/cpts/grid-map.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/src/views/modules/visual/test/l7.vue b/src/views/modules/visual/test/l7.vue index f1badfd0..951fd7b7 100644 --- a/src/views/modules/visual/test/l7.vue +++ b/src/views/modules/visual/test/l7.vue @@ -28,6 +28,9 @@ import { GaodeMap, Map } from "@antv/l7-maps"; import { spliceIntoChunks } from "@/utils/index"; let scene; +// window._AMapSecurityConfig = { +// securityJsCode: "您申请的安全密钥", +// }; export default { name: "l7", @@ -115,33 +118,33 @@ export default { methods: { iniMap() { const { srcMapData } = this; - scene = new Scene({ - id: "map", - logoVisible: false, - map: new GaodeMap({ - // viewMode: "3D", - pitch: 35.210526315789465, - style: "dark", - // style: "light", - center: [srcMapData.longitude, srcMapData.latitude], - // token: "xxxx - token", - zoom: 18, - minZoom: 10, - }), - }); + scene = new Scene({ + id: "map", + logoVisible: false, + map: new GaodeMap({ + // viewMode: "3D", + pitch: 35.210526315789465, + // style: "dark", + style: "light", + center: [srcMapData.longitude, srcMapData.latitude], + // token: "77e4e81967f342b3e7b81ad1d0411224", + zoom: 18, + minZoom: 10, + }), + }); - // scene = new Scene({ - // id: "map", - // map: new Map({ - // pitch: 35.210526315789465, - // style: "dark", - // // style: "light", - // center: [srcMapData.longitude, srcMapData.latitude], - // // token: "xxxx - token", - // zoom: 18, - // minZoom: 10, - // }), - // }); + // scene = new Scene({ + // id: "map", + // map: new Map({ + // pitch: 35.210526315789465, + // style: "dark", + // // style: "light", + // center: [srcMapData.longitude, srcMapData.latitude], + // // token: "xxxx - token", + // zoom: 18, + // minZoom: 10, + // }), + // }); scene.on("loaded", () => { // 底图服务 From aee54a87be2d8db72784f9a21b40e3e36b9d6ef5 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 22 Jul 2022 18:20:13 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=BA=E6=88=BF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visual/basicinfo/basicInfoMain-备份.vue | 1017 +++++++++++++++++ .../visual/basicinfo/basicInfoMain.vue | 91 +- .../visual/basicinfo/cpts/grid-map.vue | 232 ++-- 3 files changed, 1195 insertions(+), 145 deletions(-) create mode 100644 src/views/modules/visual/basicinfo/basicInfoMain-备份.vue diff --git a/src/views/modules/visual/basicinfo/basicInfoMain-备份.vue b/src/views/modules/visual/basicinfo/basicInfoMain-备份.vue new file mode 100644 index 00000000..c57aaef3 --- /dev/null +++ b/src/views/modules/visual/basicinfo/basicInfoMain-备份.vue @@ -0,0 +1,1017 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue index 38908c51..3a0e2cce 100644 --- a/src/views/modules/visual/basicinfo/basicInfoMain.vue +++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue @@ -34,7 +34,11 @@ v-show="orgLevel !== 'people' && orgLevel !== 'neighborHood'" class="div_map" > - +
@@ -76,21 +80,6 @@
- -
@@ -203,7 +192,7 @@ export default { async mounted() { //加载组织数据 - // await this.loadOrgData(); + await this.loadOrgData(); await this.loadList(); }, @@ -223,6 +212,30 @@ export default { this.showAgencyList = !this.showAgencyList; }, + //加载组织数据 + async loadOrgData() { + const url = "/gov/org/agency/maporg"; + let params = { + orgId: this.orgId, + level: this.orgLevel, + }; + + const { data, code, msg } = await requestPost(url, params); + + if (code === 0) { + this.orgData = data; + this.orgId = this.orgData.id; + this.orgLevel = this.orgData.level; + if (data.children && data.children.length > 0) { + this.subAgencyArray = data.children; + } else { + this.subAgencyArray = []; + } + } else { + this.$message.error(msg); + } + }, + //获取右侧infolist数据 async loadList() { this.infoLoading = true; @@ -268,6 +281,38 @@ export default { this.level = ""; }, + //返回所选组织 + handleClickAgency(index) { + //如果是从小区返回,清空一下小区的人员显示列表 + if (this.orgLevel === "neighborHood") { + this.$nextTick(() => { + // 小区id,小区名称 + this.$refs.ref_community.handleCloseAllUser(); + }); + } + const cutNum = this.runAgencyArray.length - index; //要减去的长度 + this.runNum = this.runNum - cutNum; + + this.orgData = this.runAgencyArray[index]; + + for (let i = 0; i < cutNum; i++) { + this.runAgencyArray.pop(); + } + + this.orgId = this.orgData.id; + this.orgLevel = this.orgData.level; + + if (this.orgLevel === "people") { + } else if (this.orgLevel === "neighborHood") { + //显示小区 + } else { + this.$nextTick(() => { + this.refreshMap(true); + this.$forceUpdate(); + }); + } + }, + //点击组织列表数据 clickAgencyItem(item, index) { let e = { @@ -304,10 +349,6 @@ export default { return false; } this.runNum++; - this.orgData.center = map.getView().getCenter(); - this.orgData.zoom = map.getView().getZoom(); - console.log("center", map.getView().getCenter()); - console.log("zoom", map.getView().getZoom()); this.runAgencyArray.push(this.orgData); @@ -334,6 +375,14 @@ export default { } }, + //刷新地图 + async refreshMap(isRefreshView) { + //加载组织数据 + await this.loadOrgData(); + + await this.loadList(); + }, + //开启加载动画 startLoading() { loading = Loading.service({ diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue index f7eedd84..9756ea9f 100644 --- a/src/views/modules/visual/basicinfo/cpts/grid-map.vue +++ b/src/views/modules/visual/basicinfo/cpts/grid-map.vue @@ -9,91 +9,32 @@ import { requestPost } from "@/js/dai/request"; import cptCard from "@/views/modules/visual/cpts/card"; import cptTb from "@/views/modules/visual/cpts/tb"; import nextTick from "dai-js/tools/nextTick"; -import dateFormat from "dai-js/tools/dateFormat"; -import { - Scene, - PointLayer, - PolygonLayer, - LineLayer, - CityBuildingLayer, - RasterLayer, - Popup, -} from "@antv/l7"; +import { Scene, PolygonLayer, LineLayer } from "@antv/l7"; import { GaodeMap, Map } from "@antv/l7-maps"; -// import { DrawEvent, DrawPolygon } from "@antv/l7-draw"; import { spliceIntoChunks } from "@/utils/index"; let scene; -// window._AMapSecurityConfig = { -// securityJsCode: "您申请的安全密钥", -// }; +let polygonLayer; +let lineLayer; +let textLayer; +let posLayer; +let circleLayer; export default { name: "l7", + data() { return { - srcMapData: [], - dotData: [], - iconUrlArray: { - anzhibangjiao: require("@/assets/img/shuju/fiveLayer/anzhibangjiao.png"), - buliangqingshaonian: require("@/assets/img/shuju/fiveLayer/buliangqingshaonian.png"), - shequjiaozheng: require("@/assets/img/shuju/fiveLayer/shequjiaozheng.png"), - resi_xfry: require("@/assets/img/shuju/fiveLayer/resi_xfry.png"), - xidurenyuan: require("@/assets/img/shuju/fiveLayer/xidurenyuan.png"), - xiejiaorenyuan: require("@/assets/img/shuju/fiveLayer/xiejiaorenyuan.png"), - zhaoshizhaohuojingshenbing: require("@/assets/img/shuju/fiveLayer/zhaoshizhaohuojingshenbing.png"), - - yjdw: require("@/assets/img/shuju/fiveLayer/yjdw.png"), - sr_gy: require("@/assets/img/shuju/fiveLayer/sr_gy.png"), - sr_gc: require("@/assets/img/shuju/fiveLayer/sr_gc.png"), - whdw: require("@/assets/img/shuju/fiveLayer/whdw.png"), - sr_ggld: require("@/assets/img/shuju/fiveLayer/sr_ggld.png"), - lwh: require("@/assets/img/shuju/fiveLayer/lwh.png"), - sr_tyc: require("@/assets/img/shuju/fiveLayer/sr_tyc.png"), - lyjlb: require("@/assets/img/shuju/fiveLayer/lyjlb.png"), - sr_yjy: require("@/assets/img/shuju/fiveLayer/sr_yjy.png"), - zaxld: require("@/assets/img/shuju/fiveLayer/zaxld.png"), - other: require("@/assets/img/shuju/fiveLayer/other.png"), - sr_jzz: require("@/assets/img/shuju/fiveLayer/sr_jzz.png"), - sr_djc: require("@/assets/img/shuju/fiveLayer/sr_djc.png"), - sr_rfqck: require("@/assets/img/shuju/fiveLayer/sr_rfqck.png"), - ep_lg: require("@/assets/img/shuju/fiveLayer/ep_lg.png"), - sr_xfz: require("@/assets/img/shuju/fiveLayer/sr_xfz.png"), - pu_jgzsbm: require("@/assets/img/shuju/fiveLayer/pu_jgzsbm.png"), - ep_qt: require("@/assets/img/shuju/fiveLayer/ep_qt.png"), - - gr_czw: require("@/assets/img/shuju/fiveLayer/gr_czw.png"), - ep_cycs: require("@/assets/img/shuju/fiveLayer/ep_cycs.png"), - dc_jyz: require("@/assets/img/shuju/fiveLayer/dc_jyz.png"), - ep_gwylcs: require("@/assets/img/shuju/fiveLayer/ep_gwylcs.png"), - dc_jqz: require("@/assets/img/shuju/fiveLayer/dc_jqz.png"), - dc_whpdw: require("@/assets/img/shuju/fiveLayer/dc_whpdw.png"), - ep_wb: require("@/assets/img/shuju/fiveLayer/ep_wb.png"), - ep_mrxycs: require("@/assets/img/shuju/fiveLayer/ep_mrxycs.png"), - dc_yqhjz: require("@/assets/img/shuju/fiveLayer/dc_yqhjz.png"), - dc_jzgd: require("@/assets/img/shuju/fiveLayer/dc_jzgd.png"), - ep_scjgqy: require("@/assets/img/shuju/fiveLayer/ep_scjgqy.png"), - - cm_nmsc: require("@/assets/img/shuju/fiveLayer/cm_nmsc.png"), - event_tdnd: require("@/assets/img/shuju/fiveLayer/event_tdnd.png"), - cm_bhsc: require("@/assets/img/shuju/fiveLayer/cm_bhsc.png"), - cm_cjsc: require("@/assets/img/shuju/fiveLayer/cm_cjsc.png"), - ep_lssd: require("@/assets/img/shuju/fiveLayer/ep_lssd.png"), - - resi_szry: require("@/assets/img/shuju/fiveLayer/resi_szry.png"), - ps_lyy: require("@/assets/img/shuju/fiveLayer/ps_lyy.png"), - resi_snry: require("@/assets/img/shuju/fiveLayer/resi_snry.png"), - ps_mzb: require("@/assets/img/shuju/fiveLayer/ps_mzb.png"), - ps_zs: require("@/assets/img/shuju/fiveLayer/ps_zs.png"), - ps_wss: require("@/assets/img/shuju/fiveLayer/ps_wss.png"), - ps_jjz: require("@/assets/img/shuju/fiveLayer/ps_jjz.png"), - ep_xx: require("@/assets/img/shuju/fiveLayer/ep_xx.png"), - ep_yy: require("@/assets/img/shuju/fiveLayer/ep_yy.png"), - }, + // srcGridData: {}, }; }, - props: {}, + props: { + srcGridData: { + type: Object, + default: null, + }, + }, computed: {}, @@ -105,63 +46,94 @@ export default { watch: {}, async mounted() { - await this.getMapData(); + // 临时这么用吧 + window._AMapSecurityConfig = { + securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2", + }; + + // await this.getMapData(); this.iniMap(); - await this.getDotData(); - this.updateMap(); + }, + + computed: { + polygonData() { + const { srcGridData } = this; + if ( + !srcGridData || + !srcGridData.children || + !Array.isArray(srcGridData.children) + ) { + return { type: "FeatureCollection", features: [] }; + } + const polygon = [ + ...srcGridData.children + .filter((item) => item.coordinates.length > 0) + .map((item) => ({ + type: "Feature", + properties: { + // id: item.id, + // name: item.name, + // level: item.level, + center: [item.longitude, item.latitude], + ...item, + }, + geometry: { + type: "Polygon", + coordinates: [ + spliceIntoChunks( + item.coordinates.split(",").map((item) => parseFloat(item)), + 2 + ), + ], + }, + })), + ]; + return { type: "FeatureCollection", features: polygon }; + }, + }, + + watch: { + srcGridData(val, oldValue) { + if (oldValue == null) { + this.iniMap(); + } else { + this.updateMap(); + } + }, }, methods: { iniMap() { - // 临时这么用吧 - window._AMapSecurityConfig = { - securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2", - }; + const { srcGridData, polygonData } = this; + if (!srcGridData) return false; - const { srcMapData } = this; scene = new Scene({ id: "map", logoVisible: false, map: new GaodeMap({ - // viewMode: "3D", - pitch: 35.210526315789465, + pitch: 60, // style: "dark", - style: "light", - center: [srcMapData.longitude, srcMapData.latitude], + // style: "grey", + style: "amap://styles/blue", + center: [ + srcGridData.longitude || this.$store.state.user.longitude, + srcGridData.latitude || this.$store.state.user.latitude, + ], token: "fc14b42e0ca18387866d68ebd4f150c1", zoom: 18, minZoom: 10, + isHotspot: false, + resizeEnable: true, + doubleClickZoom: false, }), }); scene.on("loaded", () => { - const polygon = [ - ...srcMapData.children - .filter((item) => item.coordinates.length > 0) - .map((item) => ({ - type: "Feature", - properties: { - name: item.name, - center: [item.longitude, item.latitude], - }, - geometry: { - type: "Polygon", - coordinates: [ - spliceIntoChunks( - item.coordinates.split(",").map((item) => parseFloat(item)), - 2 - ), - ], - }, - })), - ]; - console.log(polygon); - - const polygonLayer = new PolygonLayer({ + polygonLayer = new PolygonLayer({ autoFit: true, }) // .size(1000) - .source({ type: "FeatureCollection", features: polygon }) + .source(polygonData) .color("name", [ "rgba(255, 100, 60, 0.5)", "rgba(43, 231, 253, 0.35)", @@ -184,11 +156,11 @@ export default { scene.addLayer(polygonLayer); - const linelayer = new LineLayer({ + lineLayer = new LineLayer({ zIndex: 2, name: "line2", }) - .source({ type: "FeatureCollection", features: polygon }) + .source(polygonData) .shape("line") .size(1) .color("name", [ @@ -204,12 +176,12 @@ export default { duration: 2, // 持续时间,延时 trailLength: 2, // 流线长度 }); - scene.addLayer(linelayer); + scene.addLayer(lineLayer); - const circleLayer = new PolygonLayer({ + circleLayer = new PolygonLayer({ zIndex: 3, }) - .source({ type: "FeatureCollection", features: polygon }) + .source(polygonData) .color("name", [ "rgba(255, 50, 50, 0.99)", "rgba(43, 231, 253, 0.99)", @@ -237,10 +209,10 @@ export default { "pos-yellow", require("@/assets/img/shuju/grid/pos-yellow.png") ); - const posLayer = new PolygonLayer({ + posLayer = new PolygonLayer({ zIndex: 4, }) - .source({ type: "FeatureCollection", features: polygon }) + .source(polygonData) .shape("name", ["pos-red", "pos-green", "pos-yellow"]) .size(12) .style({ @@ -250,10 +222,10 @@ export default { }); scene.addLayer(posLayer); - const textLayer = new PolygonLayer({ + textLayer = new PolygonLayer({ zIndex: 10, }) - .source({ type: "FeatureCollection", features: polygon }) + .source(polygonData) .color("name", [ "rgba(255, 100, 60, 0.99)", "rgba(43, 231, 253, 0.99)", @@ -273,17 +245,18 @@ export default { .active(true); scene.addLayer(textLayer); - textLayer.on("mousemove", (e) => { - textLayer.style({ + polygonLayer.on("mousemove", (e) => { + polygonLayer.style({ raisingHeight: 0, }); }); - textLayer.on("click", (e) => { - console.log(e.feature.properties.name); + polygonLayer.on("click", (e) => { + console.log(e.feature.properties); + this.$emit("clickAgency", e.feature.properties); }); - textLayer.on("unmousemove", (e) => { + polygonLayer.on("unmousemove", (e) => { polygonLayer.style({ raisingHeight: 0, }); @@ -291,13 +264,24 @@ export default { }); }, + updateMap() { + const { polygonData } = this; + if (polygonLayer) { + polygonLayer.setData(polygonData); + lineLayer.setData(polygonData); + textLayer.setData(polygonData); + posLayer.setData(polygonData); + circleLayer.setData(polygonData); + } + }, + async getMapData() { const { data, code, msg } = await requestPost("/gov/org/agency/maporg", { level: "", orgId: "", }); if (msg === "success" && code === 0) { - this.srcMapData = data; + this.srcGridData = data; } }, }, From 2910efe1583a0bdcc8f69321ace7b9c863994ec3 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 26 Jul 2022 09:41:50 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visual/basicinfo/cpts/grid-map.vue | 128 +++++++++++++----- 1 file changed, 95 insertions(+), 33 deletions(-) diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue index 9756ea9f..d1f5cbd0 100644 --- a/src/views/modules/visual/basicinfo/cpts/grid-map.vue +++ b/src/views/modules/visual/basicinfo/cpts/grid-map.vue @@ -1,6 +1,14 @@ @@ -22,10 +30,61 @@ let circleLayer; export default { name: "l7", + inject: ["refresh"], data() { return { + mapStyleType: localStorage.getItem("mapStyle") || "dark", // srcGridData: {}, + darkStyle: { + style: "amap://styles/blue", + polygonColor: [ + "rgba(255, 100, 60, 0.5)", + "rgba(43, 231, 253, 0.35)", + "rgba(255, 255, 50, 0.35)", + ], + lineColor: [ + "rgba(255, 180, 150, 0.9)", + "rgba(43, 231, 253, 0.7)", + "rgba(255, 255, 50, 0.7)", + ], + circleColor: [ + "rgba(255, 180, 150, 0.99)", + "rgba(43, 231, 253, 0.99)", + "rgba(255, 255, 50, 0.99)", + ], + textColor: [ + "rgba(255, 100, 60, 0.99)", + "rgba(43, 231, 253, 0.99)", + "rgba(255, 255, 50, 0.99)", + ], + textStrokeColor: "#fff", + }, + + lightStyle: { + style: "amap://styles/whitesmoke", + polygonColor: [ + "rgba(255, 100, 60, 0.3)", + "rgba(43, 231, 253, 0.3)", + "rgba(255, 255, 50, 0.3)", + ], + lineColor: [ + "rgba(220, 150, 120, 0.9)", + "rgba(33, 201, 223, 0.8)", + "rgba(200, 200, 50, 0.9)", + ], + circleColor: [ + "rgba(255, 180, 150, 0.99)", + "rgba(13, 181, 203, 0.8)", + "rgba(255, 255, 50, 0.99)", + ], + textColor: [ + "rgba(200, 50, 10, 0.99)", + "rgba(0, 130, 153, 0.99)", + "rgba(120, 120, 0, 0.99)", + ], + textStrokeColor: "#666", + }, }; }, @@ -104,17 +163,20 @@ export default { methods: { iniMap() { - const { srcGridData, polygonData } = this; + const { darkStyle, lightStyle, srcGridData, polygonData } = this; if (!srcGridData) return false; + let styleConfig = darkStyle; + if (this.mapStyleType == "light") { + styleConfig = lightStyle; + } + scene = new Scene({ id: "map", logoVisible: false, map: new GaodeMap({ pitch: 60, - // style: "dark", - // style: "grey", - style: "amap://styles/blue", + style: styleConfig.style, center: [ srcGridData.longitude || this.$store.state.user.longitude, srcGridData.latitude || this.$store.state.user.latitude, @@ -134,11 +196,7 @@ export default { }) // .size(1000) .source(polygonData) - .color("name", [ - "rgba(255, 100, 60, 0.5)", - "rgba(43, 231, 253, 0.35)", - "rgba(255, 255, 50, 0.35)", - ]) + .color("name", styleConfig.polygonColor) // .shape("extrude") .shape("fill") .style({ @@ -163,11 +221,7 @@ export default { .source(polygonData) .shape("line") .size(1) - .color("name", [ - "rgba(255, 50, 50, 0.7)", - "rgba(43, 231, 253, 0.7)", - "rgba(255, 255, 50, 0.7)", - ]) + .color("name", styleConfig.lineColor) .style({ opacity: 1, }) @@ -182,11 +236,7 @@ export default { zIndex: 3, }) .source(polygonData) - .color("name", [ - "rgba(255, 50, 50, 0.99)", - "rgba(43, 231, 253, 0.99)", - "rgba(255, 255, 50, 0.99)", - ]) + .color("name", styleConfig.circleColor) .shape("circle") .active(true) .animate(true) @@ -223,24 +273,21 @@ export default { scene.addLayer(posLayer); textLayer = new PolygonLayer({ - zIndex: 10, + zIndex: 20, }) .source(polygonData) - .color("name", [ - "rgba(255, 100, 60, 0.99)", - "rgba(43, 231, 253, 0.99)", - "rgba(255, 255, 50, 0.99)", - ]) + .color("name", styleConfig.textColor) .shape("name", "text") .size(16) .style({ textAnchor: "center", // 文本相对锚点的位置 center|left|right|top|bottom|top-left textOffset: [0, 40], // 文本相对锚点的偏移量 [水平, 垂直] spacing: 2, // 字符间距 - padding: [1, 1], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近 - stroke: "#ffffff", // 描边颜色 - strokeWidth: 0.3, // 描边宽度 - strokeOpacity: 1.0, + padding: [2, 2], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近 + stroke: styleConfig.textStrokeColor, // 描边颜色 + strokeWidth: 0.1, // 描边宽度 + strokeOpacity: 0.8, + textAllowOverlap: true, }) .active(true); scene.addLayer(textLayer); @@ -264,6 +311,12 @@ export default { }); }, + shiftMapStyle(type) { + this.mapStyleType = type; + localStorage.setItem("mapStyle", type); + this.refresh(); + }, + updateMap() { const { polygonData } = this; if (polygonLayer) { @@ -289,10 +342,6 @@ export default { From d4c125cb49902da39655f6b626e7316664d11138 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 26 Jul 2022 13:45:22 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=BE=9B=E8=B0=83=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/basicinfo/cpts/grid-map.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue index d1f5cbd0..afbd0af0 100644 --- a/src/views/modules/visual/basicinfo/cpts/grid-map.vue +++ b/src/views/modules/visual/basicinfo/cpts/grid-map.vue @@ -171,6 +171,8 @@ export default { styleConfig = lightStyle; } + console.log('地图初始化数据', polygonData) + scene = new Scene({ id: "map", logoVisible: false, From fc260c675473394b1381c303db0841d91dc172e4 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 26 Jul 2022 13:54:34 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/basicinfo/cpts/grid-map.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue index afbd0af0..a357ca6f 100644 --- a/src/views/modules/visual/basicinfo/cpts/grid-map.vue +++ b/src/views/modules/visual/basicinfo/cpts/grid-map.vue @@ -142,7 +142,7 @@ export default { spliceIntoChunks( item.coordinates.split(",").map((item) => parseFloat(item)), 2 - ), + ).filter((item) => item.length == 2), ], }, })), @@ -171,7 +171,7 @@ export default { styleConfig = lightStyle; } - console.log('地图初始化数据', polygonData) + console.log("地图初始化数据", polygonData); scene = new Scene({ id: "map", From a39d0398e6d96ee000148a4ba0a2665b8b8b4a68 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 26 Jul 2022 15:11:14 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/basicinfo/cpts/grid-map.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue index a357ca6f..b830be4c 100644 --- a/src/views/modules/visual/basicinfo/cpts/grid-map.vue +++ b/src/views/modules/visual/basicinfo/cpts/grid-map.vue @@ -196,7 +196,7 @@ export default { polygonLayer = new PolygonLayer({ autoFit: true, }) - // .size(1000) + // .size(0) .source(polygonData) .color("name", styleConfig.polygonColor) // .shape("extrude") @@ -209,7 +209,7 @@ export default { opacity: 1, // heightfixed: true, // pickLight: true, - // raisingHeight: 1000, + raisingHeight: 0, // sourceColor: "#333", // targetColor: "rgba(255,255,255, 0.5)", }); @@ -346,8 +346,9 @@ export default {