From 1e810233f13083bfb48e18b71c8366af031d7341 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Tue, 23 Jul 2024 14:50:59 +0800 Subject: [PATCH] gx --- src/assets/images/map/dwd.png | Bin 0 -> 3118 bytes src/view/sy_map.vue | 40 ++++++++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 src/assets/images/map/dwd.png diff --git a/src/assets/images/map/dwd.png b/src/assets/images/map/dwd.png new file mode 100644 index 0000000000000000000000000000000000000000..a538b30fdd1724d7c40f0301dd8962491370bdce GIT binary patch literal 3118 zcmV+}4AJw6P)Px==t)FDRCr#^TMKYi)fHX)CXhTJgzzgws8m`6wKI+sY^_d9?bzXO+fiv7Yq5ZQ zEl{agKZHUB!~*3LkdMj$7NjEr1xGt#JKE9$j?P#WnPRP>36(%dLU;)zZ#VbdcXB@W z-1p0Sp>IZq_wL>2>~+pMYwxqq2_Z`#X6_8&YZ2gP0D~C(MF-RmKo;XGIQU{z&!xp1zrC2bRLrJ6F!AmA7?3l+3(@Q80#6HYHS^Uu;1vx1o^()B zRnSvX*rTiaT?H>lY|=iFJ%E>*L34|U{+%lDlmVaPrV@b42q^H+s+?g#S`VQ7*yyeg zn#vS0Kvw%Y22bx!x!Y3#oiyNb=1?A*H#ndlOX_+KiH|Ny0=)OOIRNVSHrj6u!@Gji|fPxPO7pyL8AXYS5udJCW-LVNYmH(eLx z6+y@T+#itSDi%w`dnaZ44+*)q_9r?Q1Ue9K1#_oHG`&v1SCdU1bXuBW%ARm|Gj5}N z+V+3TL+FzK0|B4pOWPP!B2xr4jgV%#7^z`L1Q&I-Rb5xzTe1CN+3^O=pR*|c|npMHrtKI<1$uThA{+Zzf@7tu`Vj9#88_kwXZ#oy^-?& zpfam<0FH6vI|SSqkILRN89mixUv2};88TN=yV}1ql=5!!0Y1tNBLO<73YEGl?eSM7 zzM5S4H-1;ro`6xqDE}4VZ4~@rZa4&BL}IzI$4zq%65or<8-fJADX zJXG&ZSG@`Kp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H*G`D z2a*As8sI4Bm`YH!Ap%VC0GOA`)QnfAn{vj?gUq(tM>f8I-cyqWn>yea=n1GQ12EN$ zg_2~+$6b5qNXmZ0PV}6f3fS}j$3TA{RqGt^G`(u1pF#QsNDo%#b0J)+qMD^0&uLn} z8$D;F3O0Sft)S1WiGXLAmtj1|Wy%pRZmaLbz{D0ypncg(=ruDPux$ezn}%_GdJVyu z8I%t|3POU1d zu~?sNk?IJxV9f#Q^I$Um#CsDL*)Msv{z-9%o+vqpB@@WQsu1b(PpZ3e8D$S!b{>`7L??agcn>E00!?$te@|M31 zekfihFN=gaECQZ>llr=Ut(x&q#zf2J*)3eTtfl(!i{JxIz4#Mz=Bd9@--k1fG}d5N z0lR$+=gOr3#{dMWb8B!~c7*!6H+!@8$vR-y^PybvWJ?+P5%d0+fojRyRQ$`VA#JZ2 z765MIieE>77$9|JyJH@C@?GlpXtu#-RkUo*f0-*50sNTvtd+)#-=pHk+XHO719m$c z!WF+Fa10mA|1soiws{*Tw*&2lZ0UMig7 {{ itemm.name }} @@ -111,6 +111,7 @@ import j9 from "@/assets/images/map/j9.png"; import j10 from "@/assets/images/map/j10.png"; import m1 from "@/assets/images/map/m1.png"; import m2 from "@/assets/images/map/m2.png"; +import dwd from "@/assets/images/map/dwd.png"; //地图设置 //默认龙游县灰色地块 const mapTownDataDK = reactive([]); @@ -161,6 +162,10 @@ const addPolygonCounty = () => { fillColor: fillColor, fillOpacity: 0.7, name: item.name, + flag: "v", + }); + polygon.addEventListener("click", () => { + console.log(1111111); }); map.addOverlay(polygon); } @@ -185,8 +190,7 @@ const createCustomOverlay = (polygon) => { div.style.display = "flex"; div.style.justifyContent = "center"; div.style.alignItems = "center"; - div.style.background = - "url(/src/assets/images/map/b1.png) no-repeat 0/100% 100%"; + div.style.background = polygon.bgColor; div.style.cursor = "pointer"; div.setAttribute("name", this.properties.title); @@ -198,10 +202,9 @@ const createCustomOverlay = (polygon) => { div.appendChild(title); title.appendChild(document.createTextNode(this.properties.title)); - - let img2 = document.createElement("img"); - img2.style.width = "60px"; + img2.style.width = "20px"; + img2.style.height = "20px"; img2.src = this.properties.imgSrc2; content.appendChild(div); @@ -222,7 +225,7 @@ const createCustomOverlay = (polygon) => { offsetY: -10, properties: { title: polygon.name, - imgSrc2: m2, + imgSrc2: dwd, type: "customOverlay", }, }); @@ -243,7 +246,7 @@ const choose = ref({ const change = (id, name) => { choose.value[name] = id; }; -const changeFwq = (id, list,center) => { +const changeFwq = (id, list, center) => { choose.value.fwq = id; fwqList.value = list; goMapCenter(center, 17); @@ -433,83 +436,102 @@ const jbfwqTotal = ref([ { id: 41, name: "新溪社区", - center:[119.1845892, 28.8540481], + center: [119.1845892, 28.8540481], fwqList: [ { name: "溪口幼儿园", point: [119.1856806, 28.8509359], + bgColor: "#00b050", }, { name: "衢州学院附属幼儿园", point: [119.182056, 28.8566857], + bgColor: "#00b050", }, { name: "溪口中银小学", point: [119.1845353, 28.8584533], + bgColor: "#00b050", }, { name: "溪口初中", point: [119.180978, 28.8525691], + bgColor: "#00b050", }, { name: "居家养老中心", point: [119.186287, 28.8491049], + bgColor: "#f4c243", }, { name: "共享食堂", point: [119.184706, 28.8563179], + bgColor: "#f4c243", }, { name: "老年活动中心", point: [119.1839065, 28.8566106], + bgColor: "#f4c243", }, { name: "残疾人之家", point: [119.1862825, 28.8491207], + bgColor: "#f4c243", }, { name: "智慧篮球场", point: [119.1839873, 28.8560886], + bgColor: "#00b0f0", }, { name: "慢行步道", point: [119.1843107, 28.8510743], + bgColor: "#00b0f0", }, { name: "文化礼堂", point: [119.1845532, 28.8562072], + bgColor: "#a1ce63", }, { name: "综合文化站", point: [119.1845982, 28.8482348], + bgColor: "#a1ce63", }, { name: "共享菜园", point: [119.1834393, 28.8559858], + bgColor: "#a1ce63", }, { name: "零工市场", point: [119.1811487, 28.8614348], + bgColor: "#a1ce63", }, { name: "溪口中心医院", point: [119.1839334, 28.8516437], + bgColor: "#0070c0", }, { name: "溪口菜市场", point: [119.1848317, 28.8544673], + bgColor: "#184e32", }, { name: "大型超市", point: [119.1845892, 28.8540481], + bgColor: "#184e32", }, { name: "智慧停车场", point: [119.1865654, 28.8555824], + bgColor: "#184e32", }, { name: "溪口镇便民服务中心", point: [119.1838436, 28.8565473], + bgColor: "#184e32", }, ], },