From 5e657625ea5e22360b2bf44080bc200ad1fd953a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 4 Jul 2025 18:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/synthesisQuery/digitalSignage.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/resources/static/js/synthesisQuery/digitalSignage.js b/src/main/resources/static/js/synthesisQuery/digitalSignage.js index a193048..43ea473 100644 --- a/src/main/resources/static/js/synthesisQuery/digitalSignage.js +++ b/src/main/resources/static/js/synthesisQuery/digitalSignage.js @@ -359,10 +359,10 @@ function addAllMapPoints() { const iconUrl = iconTypeList[12]; // 默认使用第一个图标 const myIcon = new BMapGL.Icon( iconUrl, - new BMapGL.Size(14, 14), + new BMapGL.Size(20, 20), { - anchor: new BMapGL.Size(7, 14), // 修正锚点位置为中心底部 - imageSize: new BMapGL.Size(14, 14), // 与实际图片尺寸一致 + anchor: new BMapGL.Size(10, 20), // 修正锚点位置为中心底部 + imageSize: new BMapGL.Size(20, 20), // 与实际图片尺寸一致 } ); @@ -455,9 +455,9 @@ function addAllMapPoints() { const point = new BMapGL.Point(intLng, intLat); bounds.push(point); const iconUrl = iconTypeList[20]; - const myIcon = new BMapGL.Icon(iconUrl, new BMapGL.Size(14, 14), { - anchor: new BMapGL.Size(14, 14), // 修正锚点位置为中心底部 - imageSize: new BMapGL.Size(14, 14), // 与实际图片尺寸一致 + const myIcon = new BMapGL.Icon(iconUrl, new BMapGL.Size(20, 20), { + anchor: new BMapGL.Size(10, 20), // 修正锚点位置为中心底部 + imageSize: new BMapGL.Size(20, 20), // 与实际图片尺寸一致 }); const marker = new BMapGL.Marker(point, { icon: myIcon }); @@ -540,10 +540,10 @@ function addAllMapPoints() { // 1. 创建主标记点 const iconUrl = iconTypeList[parseInt(pointData.towerProgress)]; - let X = 14; - let Y = 14; - let anchorX = 7; - let anchorY = 14; + let X = 20; + let Y = 20; + let anchorX = 10; + let anchorY = 20; // if ([1, 2, 3, 4, 5, 6, 0].includes(pointData.towerProgress)) { // X = 14; // Y = 33.75; @@ -754,9 +754,9 @@ function addAllMapPoints() { // 4. 添加标签 let offset = new BMapGL.Size(-8, -18); if (index % 2 == 0) { - offset = new BMapGL.Size(-10, -28); + offset = new BMapGL.Size(-12, -58); } else { - offset = new BMapGL.Size(-10, 4); + offset = new BMapGL.Size(-12, 24); } const label = new BMapGL.Label(pointData.towerName, { position: point, @@ -766,13 +766,13 @@ function addAllMapPoints() { overlays.push(label); label.setStyle({ color: "#fff", - fontSize: "6px", + fontSize: "8px", backgroundColor: "rgba(0, 0, 0, 0.5)", border: "none", padding: "0 1px", - border: "1px solid #ccc", + // border: "1px solid #ccc", boxShadow: "0 0 2px 0 rgba(0, 0, 0, 0.5)", - borderRadius: "4px", + // borderRadius: "4px", }); }); @@ -804,9 +804,9 @@ function addAllMapPoints() { // 检查图标是否存在,不存在则使用默认图标 const iconUrl = iconTypeList[21]; // 默认使用第一个图标 - const myIcon = new BMapGL.Icon(iconUrl, new BMapGL.Size(14, 14), { - anchor: new BMapGL.Size(7, 14), // 修正锚点位置为中心底部 - imageSize: new BMapGL.Size(14, 14), // 与实际图片尺寸一致 + const myIcon = new BMapGL.Icon(iconUrl, new BMapGL.Size(20, 20), { + anchor: new BMapGL.Size(10, 20), // 修正锚点位置为中心底部 + imageSize: new BMapGL.Size(20, 20), // 与实际图片尺寸一致 }); const marker = new BMapGL.Marker(point, { icon: myIcon });