diff --git a/src/main/resources/static/css/synthesisQuery/digitalSignage.css b/src/main/resources/static/css/synthesisQuery/digitalSignage.css index 3f10e17..c79f5a0 100644 --- a/src/main/resources/static/css/synthesisQuery/digitalSignage.css +++ b/src/main/resources/static/css/synthesisQuery/digitalSignage.css @@ -313,7 +313,7 @@ body { align-items: center; position: absolute; top: 15px; - right: 15px; + right: 60px; z-index: 999; } @@ -342,3 +342,16 @@ body { background-color: #8ea8e0; color: #fff; } + +.full-screen-btn { + position: absolute; + top: 15px; + right: 15px; + z-index: 999; + cursor: pointer; +} + +.full-screen-btn img { + width: 38px; + height: 38px; +} diff --git a/src/main/resources/static/img/digitalSignage/full-screen.png b/src/main/resources/static/img/digitalSignage/full-screen.png new file mode 100644 index 0000000..b889674 Binary files /dev/null and b/src/main/resources/static/img/digitalSignage/full-screen.png differ diff --git a/src/main/resources/static/js/synthesisQuery/digitalSignage.js b/src/main/resources/static/js/synthesisQuery/digitalSignage.js index 97151bd..8d7d82e 100644 --- a/src/main/resources/static/js/synthesisQuery/digitalSignage.js +++ b/src/main/resources/static/js/synthesisQuery/digitalSignage.js @@ -154,6 +154,11 @@ function getLocationInfo(id) { console.log(result, "获取位置信息---"); const { data } = result; + crossingList = []; + crossingListNew = []; + cablewayList = []; + towerList = []; + if (data.cablewaTransVos.length > 0) { cablewayList = data.cablewaTransVos; } else { @@ -204,6 +209,9 @@ function initMap() { // 以第一个点为中心初始化地图 map.centerAndZoom(new BMapGL.Point(intLng, intLat), 15); map.enableScrollWheelZoom(true); + + // 每次初始化的时候清除所有标点以及线 + map.clearOverlays(); var styleJson = [ // 隐藏道路 { @@ -294,7 +302,7 @@ function initMap() { // 添加标点 function addAllMapPoints() { // 清除地图上所有现有的标记 - map.clearOverlays(); + // map.clearOverlays(); // const bounds = []; const bounds = []; @@ -326,11 +334,11 @@ function addAllMapPoints() { // } // addedPoints[pointKey] = true; - // const point = new BMapGL.Point( - // pointData.baiduLon, - // pointData.baiduLat - // ); - const point = new BMapGL.Point(117.132663, 31.877325); + const point = new BMapGL.Point( + pointData.baiduLon, + pointData.baiduLat + ); + // const point = new BMapGL.Point(117.132663, 31.877325); bounds.push(point); // 检查图标是否存在,不存在则使用默认图标 @@ -920,17 +928,17 @@ function getScrollData(id) { let describeHtml = ""; if (item.spanType === "跨线路") { describeHtml += ` - 上层线路:${item.upperLine} - 下层线路: ${item.lowerLine} - 交叉角度: ${item.intersectionAngle} ° - 垂直距离: ${item.verticalDistance} m - 安全裕度: ${item.safetyMargin} ° + 上层线路:${item.upperLine || "/"} + 下层线路: ${item.lowerLine || "/"} + 交叉角度: ${item.intersectionAngle || "/"} + 垂直距离: ${item.verticalDistance || "/"} + 安全裕度: ${item.safetyMargin || "/"} `; } else { describeHtml += ` - 垂直净距:${item.verticalClearDistance} m - 杆塔间距: ${item.towerSpacing} m - 公路宽度: ${item.highwayWidth} m + 垂直净距:${item.verticalClearDistance || "/"} m + 杆塔间距: ${item.towerSpacing || "/"} m + 公路宽度: ${item.highwayWidth || "/"} m `; } @@ -1077,6 +1085,8 @@ document.addEventListener("DOMContentLoaded", function () { ) { setActiveNode(obj.elem); nodeId = obj.data.id; + intLng = obj.data.lon; + intLat = obj.data.lat; getScrollData(nodeId); getLegendData(nodeId); getLocationInfo(nodeId); @@ -1141,4 +1151,14 @@ document.addEventListener("DOMContentLoaded", function () { switchBtnItemMap.classList.remove("active"); isMap = false; }); + + // 点击全屏图标时 使地图盒子全屏 + const fullScreenBtn = document.querySelector(".full-screen-btn"); + fullScreenBtn.addEventListener("click", function () { + if (document.fullscreenElement) { + document.exitFullscreen(); + } else { + document.documentElement.requestFullscreen(); + } + }); }); diff --git a/src/main/resources/static/pages/synthesisQuery/digitalSignage.html b/src/main/resources/static/pages/synthesisQuery/digitalSignage.html index 3b3846d..084fc94 100644 --- a/src/main/resources/static/pages/synthesisQuery/digitalSignage.html +++ b/src/main/resources/static/pages/synthesisQuery/digitalSignage.html @@ -100,6 +100,11 @@ 混合 + + +
+