From 1906c8174e949915ad86f58a46204cc8774f8b7b Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 14 Jul 2025 14:35:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=9C=B0=E5=9B=BE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/img/digitalSignage/gl.png | Bin 0 -> 8055 bytes .../static/img/digitalSignage/location.png | Bin 0 -> 5273 bytes .../child/setHighwayLonAndLat.js | 815 ++++-- .../lineManagement/child/setLonAndLat.js | 826 ++++-- .../child/setQzSiteLonAndLat.js | 826 ++++-- .../child/setSpanTowerLonAndLat.js | 830 ++++-- .../js/synthesisQuery/digitalSignage-new.js | 2596 +---------------- .../child/setHighwayLonAndLat.html | 24 + .../lineManagement/child/setLonAndLat.html | 24 + .../child/setQzSiteLonAndLat.html | 22 + .../child/setSpanTowerLonAndLat.html | 23 + .../lineManagement/child/towerFormTemp.html | 8 +- 12 files changed, 2545 insertions(+), 3449 deletions(-) create mode 100644 src/main/resources/static/img/digitalSignage/gl.png create mode 100644 src/main/resources/static/img/digitalSignage/location.png diff --git a/src/main/resources/static/img/digitalSignage/gl.png b/src/main/resources/static/img/digitalSignage/gl.png new file mode 100644 index 0000000000000000000000000000000000000000..00d9c64b75acf756b8f624d515f38575b5a180ca GIT binary patch literal 8055 zcma)B^;=Zm^WTLfr9&}jmQDfbSdd&gq+zAILEhvNk}D~zlprAj(y=rPA`ObPOP6$a ze%H@m@crT5^E`9s%$aBI%$%8d#p!6NkP<&31^@u0YN{{wuxsDHhY%n8E;p|Dgk69> zdMXNlijilV005(q+DnK*faR_QQMSR4!#n3UtofV_-K@&i@4qgNz?aJpWdTY`kaq+O zVfk>*cqSa-?J8lOfT#Nu9yA_tk3ik5+<9M_j`3*3rWSvWvAWsJ3h3u@nrmO;0 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#3sAiVu`=1W-{xfZ{w`T_tNM;Ktg`#|**VwM)-mk;j z9*>k{Xba;L?$IDM#GjS-Rf7~z{b8!YoF36-BjH)sl=hPI~CM60nZ_L zO-A{@-lmFGgPi^{lPO7Ltk~SfToLb7`Ld|JHR0KXW5Fyb_a)as##SNN*;Pb$B=jc_$;h0Y|Rj`d<#GbXGwy@ z^)a!LHOc^C`9MCvjy?jcDj(gU8GRv;E$;Rt`PYCX2{ai_62{p@9wGRZD_cSy($7=HRK4@t-9{ zV{K+;59BDYE{Y6u#}m_&T+H5jxJ z?^2n`{A)__M6>}UL|oin>lyV%mEAF;onyNbggt{@r%qP=Ar>l5r8mV0QDc?)C_j3| zX@bR!)%_jadNr`IXpN(^U0{n1F0Pr+_4LA6R5X@|raUPX>#K#fF_Zp7|35(o_pxJ1 V5Z$A25-gGqP*c)+S)l-n_&?g&XT|^k literal 0 HcmV?d00001 diff --git a/src/main/resources/static/img/digitalSignage/location.png b/src/main/resources/static/img/digitalSignage/location.png new file mode 100644 index 0000000000000000000000000000000000000000..8587bf4b39e59f782bf8ff1dc22860ed7b2b1e29 GIT binary patch literal 5273 zcmai2^;;9(_a9@78iGiS9$f+(LsDcTH(I(oq(ed}hXWZU1C%alq@|=oI;BKF5d@_a zr4&KryZ7_?1HM1pc>q@@a|o95gF0GN!i>S&V(cHi?OyEsiBjy#&l>mK{Ktd3q2Bj)RgL?ko|$nb64 z>Nmh;LA|L*_bFSL*g>Gd1RNhMr_$nXB0)o}1;<##gl4MgqLM*Z)`~c&5Wji*I`QgJ z+zWM*yLISjs@p$lKDpOpeHKbu>cT00bXj$m=mweWg^DfI1#UPSkQy7 z@$D=F@&OK-lxj8~T)D^$G$$u$2nU?@Z;mAsg7ng%E*xAQW;9KF!wA#~H;`+~YLoG8 z6DUbAN>2(4GjmfTpk=+jcSJUXJC?K&$CS9%FQr#cCG=JQm^a?Nt**0Gc@)RRiU+LI zguHyCwB&3>Rg_2R>|LU%@Un|qw~lTgyl8>*goW`QF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LGnbuItui zhF8JBvM+aHpaL&M-%^=$4eURpj@{>lTxD_-o@SphzB^%1f8tBZMPToV4e|{AvWnHB z?s}xkJHq}|U1cFOCAcAJH4O(9=x3X)tW57e^L@K`|d1S^Hc)(@1?rNSzZX)7^6i?0phZ6$x>1}HYpZk!w%qe2%GOBX> zHzMjlEfIZwn*?vkQC{%j=qxEl>z-TK_tEU zc|E>#R)F0Ak|r`;OS%8XSw!d3kjE1hc3@0ELv*7_2^Gkx0Ip3q?Ps7U7he#Nk>mS}1+0yle-l!}A8 zB&`oCdaJ?x4QXeM0pQMr{)j63#Gbc{(B*b_66^)nLwJfV=w}X_hHOjJb}hZX-N{Yb ziN!%nS;L$;Cz!u2tPdFH_e5g)*oF*8RHj^zx+GPgXB@kVk@|_$pQKDr4>Mf8-l>HS zerDR)Qjkd5ecx{-{_k;#Hw(#VH&KuHzdS9NcN$Q6{_>ohMeysL7UkjTjW-cXyF;*y)!wP?We~d~9<_dfgOVWd|r_H@~+*$fe%Bb}#uF{=+693?z3zSfUd^Wt; zcm2V6v=bU-YJH(tq9&h5经度:{lng}

纬度:{lat}
横{crsx} 纵{crsy}
海拔:{alt}米
层级:{level}
方向:{heading}°
俯仰角:{pitch}°
视高:{cameraHeight}米
", + }, + }, + templateValues: { + dataServer: "//data.mars3d.cn", + gltfServerUrl: "//data.mars3d.cn/gltf", + }, + terrain: { + url: "//data.mars3d.cn/terrain", + show: true, + }, + basemaps: [ + { id: 10, name: "地图底图", type: "group" }, + { + id: 2021, + pid: 10, + name: "天地图影像", + icon: "../../../../img/mars-map-img/tdt_img.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "img_d" }, + { name: "注记", type: "tdt", layer: "img_z" }, + ], + show: true, + }, + { + pid: 10, + name: "天地图电子", + icon: "../../../../img/mars-map-img/tdt_vec.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "vec_d" }, + { name: "注记", type: "tdt", layer: "vec_z" }, + ], + }, + { + pid: 10, + name: "高德影像", + type: "group", + icon: "../../../../img/mars-map-img/gaode_img.png", + layers: [ + { name: "底图", type: "gaode", layer: "img_d" }, + { name: "注记", type: "gaode", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "高德电子", + type: "gaode", + icon: "../../../../img/mars-map-img/gaode_vec.png", + layer: "vec", + }, + { + pid: 10, + name: "百度影像", + type: "group", + icon: "../../../../img/mars-map-img/bd-img.png", + layers: [ + { name: "底图", type: "baidu", layer: "img_d" }, + { name: "注记", type: "baidu", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "百度电子", + icon: "../../../../img/mars-map-img/bd-vec.png", + type: "baidu", + layer: "vec", + }, + { + pid: 10, + name: "腾讯影像", + icon: "../../../../img/mars-map-img/tencent_img.png", + type: "group", + layers: [ + { name: "底图", type: "tencent", layer: "img_d" }, + { name: "注记", type: "tencent", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "腾讯电子", + icon: "../../../../img/mars-map-img/tencent_vec.png", + type: "tencent", + layer: "vec", + }, + { + pid: 10, + name: "ArcGIS影像", + icon: "../../../../img/mars-map-img/esriWorldImagery.png", + type: "xyz", + url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + enablePickFeatures: false, + }, + ], +}; function setParams(obj) { objParams = JSON.parse(obj); @@ -73,136 +238,192 @@ function initData() { // 百度地图初始化 function initMap(list) { - if (map) { - map = null; + // if (map) { + // map = null; + // } + // map = new BMapGL.Map("map-box"); + // // 以第一个点为中心初始化地图 + // map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); + + // map.setTilt(65); //设置地图的倾斜角度 + // map.enableScrollWheelZoom(true); // 启用滚轮缩放 + + // // 设置显示3D建筑物 + // map.setDisplayOptions({ + // building: true, // 显示3D建筑物 + // indoor: false, + // poi: true, + // }); + // var navigationControl = new BMapGL.NavigationControl3D(); + // map.addControl(navigationControl); + + // // 每次初始化的时候清除所有标点以及线 + // map.clearOverlays(); + // var styleJson = [ + // // 隐藏道路 + // { + // featureType: "highway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "arterial", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "local", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "railway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + + // // 保留背景、水域、绿地等(避免地图变空白) + // { + // featureType: "background", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "water", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "green", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + + // // 保留标点和文字(避免自定义点被隐藏) + // { + // featureType: "point", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "label", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // ]; + + // if (isMap) { + // // map.setMapType(BMAP_EARTH_MAP); // 地球模式 + // map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 + // /*map.setDisplayOptions({ + // poiText: false, // 隐藏POI文字 + // poiIcon: false, // 隐藏POI图标 + // building: false, // 隐藏建筑物 + // });*/ + // } else { + // map.setMapType(BMAP_NORMAL_MAP); // 普通模式 + + // // 增加不是纯白的背景色 + // map.setMapStyleV2({ + // styleJson: [ + // { + // featureType: "background", + // elementType: "all", + // stylers: { color: "#f5f5f5" }, + // }, + // ], + // }); + // } + + // if (isMap) { + // map.setMapStyleV2({ + // styleJson, + // }); + // } + // initTowerLine(list); + // if (objParams.points) { + // let points = JSON.parse(objParams.points); + // $.each(points, function (i, item) { + // addMarker(item.lng, item.lat); + // }); + // viewPointLine(); + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } else { + // // 点击地图添加标记 + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } + + if (!mars3d.Util.webglreport()) { + mars3d.Util.webglerror(); + return; } - map = new BMapGL.Map("map-box"); - // 以第一个点为中心初始化地图 - map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); - map.setTilt(65); //设置地图的倾斜角度 - map.enableScrollWheelZoom(true); // 启用滚轮缩放 + let intLng = ""; + let intLat = ""; + if (list.length > 0) { + intLng = list[Math.floor(list.length / 2)].lon; + intLat = list[Math.floor(list.length / 2)].lat; + } - // 设置显示3D建筑物 - map.setDisplayOptions({ - building: true, // 显示3D建筑物 - indoor: false, - poi: true, + // 3. 初始化新地图 + mapConfig.scene.center.lat = intLat || 31.686288; + mapConfig.scene.center.lng = intLng || 117.229619; + map = new mars3d.Map("map-box", mapConfig); + + // 4. 创建新的图形图层 + graphicLayer = new mars3d.layer.GraphicLayer(); + // graphicLayer2 = new mars3d.layer.GraphicLayer(); + + const centerPoint = [intLng, intLat]; + + map.flyToPoint(centerPoint, { + radius: 5000, // 可视范围半径(米) + duration: 5, // 飞行时间(秒) + heading: 0, // 视角方向(0-360度) + pitch: -45, // 俯仰角度(-90俯视,0平视,90仰视) }); - var navigationControl = new BMapGL.NavigationControl3D(); - map.addControl(navigationControl); - // 每次初始化的时候清除所有标点以及线 - map.clearOverlays(); - var styleJson = [ - // 隐藏道路 - { - featureType: "highway", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "arterial", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "local", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "railway", - elementType: "all", - stylers: { visibility: "off" }, - }, + map.addLayer(graphicLayer); - // 保留背景、水域、绿地等(避免地图变空白) - { - featureType: "background", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "water", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "green", - elementType: "all", - stylers: { visibility: "on" }, - }, - - // 保留标点和文字(避免自定义点被隐藏) - { - featureType: "point", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "label", - elementType: "all", - stylers: { visibility: "on" }, - }, - ]; - - if (isMap) { - // map.setMapType(BMAP_EARTH_MAP); // 地球模式 - map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 - /*map.setDisplayOptions({ - poiText: false, // 隐藏POI文字 - poiIcon: false, // 隐藏POI图标 - building: false, // 隐藏建筑物 - });*/ - } else { - map.setMapType(BMAP_NORMAL_MAP); // 普通模式 - - // 增加不是纯白的背景色 - map.setMapStyleV2({ - styleJson: [ - { - featureType: "background", - elementType: "all", - stylers: { color: "#f5f5f5" }, - }, - ], - }); - } - - if (isMap) { - map.setMapStyleV2({ - styleJson, - }); - } + // 先把杆塔进行标点 然后连线 initTowerLine(list); + if (objParams.points) { let points = JSON.parse(objParams.points); $.each(points, function (i, item) { addMarker(item.lng, item.lat); }); viewPointLine(); - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); - } else { - // 点击地图添加标记 - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); } + + map.on(mars3d.EventType.click, function (event) { + // 1. 获取点击位置的经纬度坐标 + const cartesian = event.cartesian; // 笛卡尔坐标 + if (!cartesian) return; + + // // 将笛卡尔坐标转换为经纬度 + const position = mars3d.LngLatPoint.fromCartesian(cartesian); + const lng = position.lng; // 经度 + const lat = position.lat; // 纬度 + + addMarker(lng, lat); + }); } // 添加点坐标 function addMarker(lng, lat) { - console.log("markers标点集合", markers); - var point = new BMapGL.Point(lng, lat); - // 创建点标记 - var marker = new BMapGL.Marker(point); - // 添加到地图 - map.addOverlay(marker); + // console.log("markers标点集合", markers); + // var point = new BMapGL.Point(lng, lat); + // // 创建点标记 + // var marker = new BMapGL.Marker(point); + // // 添加到地图 + // map.addOverlay(marker); - // 创建标签 + // // 创建标签 // 2025-06-10 修改第一个标点名称为索道口 let markerName = ""; if (markers.length === 0) { @@ -210,117 +431,231 @@ function addMarker(lng, lat) { } else { markerName = "点" + (markerCount + 1); } - var label = new BMapGL.Label(markerName, { - position: point, - offset: new BMapGL.Size(10, -30), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - // 存储标记和标签 - markers.push({ - marker: marker, - label: label, - point: point, - }); - console.log(markers); + // var label = new BMapGL.Label(markerName, { + // position: point, + // offset: new BMapGL.Size(10, -30), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // // 存储标记和标签 + // markers.push({ + // marker: marker, + // label: label, + // point: point, + // }); + // console.log(markers); // 更新计数器 markerCount++; + + const billboard = new mars3d.graphic.BillboardEntity({ + position: [lng, lat, 1000], + style: { + image: "../../../../img/digitalSignage/gl.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: markerCount, + name: markerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [lng, lat], + style: { + html: `
${markerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + + markers.push({ + lng: lng, + lat: lat, + billboard: billboard, + label: label2, + }); } // 杆塔连线 function initTowerLine(points) { - // 存储所有点的坐标用于连线 - var linePoints = []; - // 添加点覆盖物和标签 - points.forEach(function (item, index) { - var point = new BMapGL.Point(item.lon, item.lat); - linePoints.push(point); // 添加到连线数组 - // 创建点标记 - var icon = new BMapGL.Icon( - "../../../../img/synthesisQuery/tower.png", - new BMapGL.Size(30, 66), - { - // 图标定位点 - anchor: new BMapGL.Size(15, 66), - } - ); - var marker = new BMapGL.Marker(point, { icon: icon }); - map.addOverlay(marker); - // 创建标签 - var label = new BMapGL.Label(item.towerName, { - position: point, - offset: new BMapGL.Size(20, -60), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - }); - // 创建连线 - var polyline = new BMapGL.Polyline(linePoints, { - strokeColor: "#FF0305", - strokeWeight: 6, - strokeOpacity: 0.8, - }); - map.addOverlay(polyline); - // 可选:自动调整视图以包含所有点 - map.setViewport(linePoints); - // 2. 获取视口边界和中心点 - var bounds = map.getBounds(); - var center = bounds.getCenter(); - // 3. 计算视口距离 - var viewportDistance = Math.max( - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(bounds.getSouthWest().lng, center.lat) - ), - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(center.lng, bounds.getSouthWest().lat) - ) - ); - // 4. 设置3D参数 - var zoom = map.getZoom(); - var newTilt = 65; - var newHeading = 30; + // // 存储所有点的坐标用于连线 + // var linePoints = []; + // // 添加点覆盖物和标签 + // points.forEach(function (item, index) { + // var point = new BMapGL.Point(item.lon, item.lat); + // linePoints.push(point); // 添加到连线数组 + // // 创建点标记 + // var icon = new BMapGL.Icon( + // "../../../../img/synthesisQuery/tower.png", + // new BMapGL.Size(30, 66), + // { + // // 图标定位点 + // anchor: new BMapGL.Size(15, 66), + // } + // ); + // var marker = new BMapGL.Marker(point, { icon: icon }); + // map.addOverlay(marker); + // // 创建标签 + // var label = new BMapGL.Label(item.towerName, { + // position: point, + // offset: new BMapGL.Size(20, -60), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // }); + // // 创建连线 + // var polyline = new BMapGL.Polyline(linePoints, { + // strokeColor: "#FF0305", + // strokeWeight: 6, + // strokeOpacity: 0.8, + // }); + // map.addOverlay(polyline); + // // 可选:自动调整视图以包含所有点 + // map.setViewport(linePoints); + // // 2. 获取视口边界和中心点 + // var bounds = map.getBounds(); + // var center = bounds.getCenter(); + // // 3. 计算视口距离 + // var viewportDistance = Math.max( + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(bounds.getSouthWest().lng, center.lat) + // ), + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(center.lng, bounds.getSouthWest().lat) + // ) + // ); + // // 4. 设置3D参数 + // var zoom = map.getZoom(); + // var newTilt = 65; + // var newHeading = 30; - // 5. 应用3D视角 - map.setTilt(newTilt); - map.setHeading(newHeading); + // // 5. 应用3D视角 + // map.setTilt(newTilt); + // map.setHeading(newHeading); - // 6. 稍微缩小以确保所有点在3D视角下可见 - setTimeout(function () { - map.setZoom(zoom - 1); - }, 100); + // // 6. 稍微缩小以确保所有点在3D视角下可见 + // setTimeout(function () { + // map.setZoom(zoom - 1); + // }, 100); + points.forEach((item, index) => { + const billboard = new mars3d.graphic.BillboardEntity({ + position: [item.lon, item.lat, 1000], + style: { + image: "../../../../img/digitalSignage/icon_three_new.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: index, + name: item.towerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [item.lon, item.lat], + style: { + html: `
${item.towerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + }); + + for (let i = 0; i < points.length - 1; i++) { + const startPoint = points[i]; + const endPoint = points[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lon, startPoint.lat], + [endPoint.lon, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#FF0305", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + } } // 清除所有标点 document.getElementById("clearMarkers").addEventListener("click", function () { markers.forEach(function (item) { - map.removeOverlay(item.marker); - map.removeOverlay(item.label); + // map.removeOverlay(item.marker); + // map.removeOverlay(item.label); + graphicLayer.removeGraphic(item.billboard); + graphicLayer.removeGraphic(item.label); }); markers = []; console.log("markers标点集合", markers); markerCount = 0; - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } + + if (lineList.length > 0) { + lineList.forEach((item) => { + graphicLayer.removeGraphic(item); + }); + lineList = []; } let frameId = parent.document @@ -338,22 +673,58 @@ function viewPointLine() { if (markers && markers.length === 0) { return layer.msg("请先创建点位", { icon: 7 }); } - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + + // 移除旧的索道线段 不要影响杆塔线段 + if (lineList.length > 0) { + lineList.forEach((item) => { + graphicLayer.removeGraphic(item); + }); + lineList = []; } - let points = []; - $.each(markers, function (index, item) { - points.push(item.point); - }); - // 2. 创建折线连接这些点位 - var polyline = new BMapGL.Polyline(points, { - strokeColor: "#0C14CA", // 线颜色 - strokeWeight: 4, // 线宽 - strokeOpacity: 0.8, // 线透明度 - }); - polylineView = polyline; - map.addOverlay(polyline); + + for (let i = 0; i < markers.length - 1; i++) { + const startPoint = markers[i]; + const endPoint = markers[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lng, startPoint.lat], + [endPoint.lng, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#0C14CA", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + lineList.push(polyline); + } + + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } + // let points = []; + // $.each(markers, function (index, item) { + // points.push(item.point); + // }); + // // 2. 创建折线连接这些点位 + // var polyline = new BMapGL.Polyline(points, { + // strokeColor: "#0C14CA", // 线颜色 + // strokeWeight: 4, // 线宽 + // strokeOpacity: 0.8, // 线透明度 + // }); + // polylineView = polyline; + // map.addOverlay(polyline); // 点击地图添加标记 // 2025-06-10 移除点击地图添加标记 解决连线之后 再次标点时标点展示异常问题 // map.addEventListener("click", function (e) { @@ -373,8 +744,10 @@ function saveData() { let points = []; $.each(markers, function (index, item) { points.push({ - lng: item.point.lng, - lat: item.point.lat, + // lng: item.point.lng, + // lat: item.point.lat, + lng: item.lng, + lat: item.lat, sort: index + 1, }); }); diff --git a/src/main/resources/static/js/basic/lineManagement/child/setLonAndLat.js b/src/main/resources/static/js/basic/lineManagement/child/setLonAndLat.js index 5334283..f5c85a1 100644 --- a/src/main/resources/static/js/basic/lineManagement/child/setLonAndLat.js +++ b/src/main/resources/static/js/basic/lineManagement/child/setLonAndLat.js @@ -7,6 +7,173 @@ let isMap = true; // 是否是地图模式 let markerCount = 0; // 标记点计数器 let markers = []; // 标记点数组 let polylineView = null; +let graphicLayer = null; +let graphicLayer2 = null; + +let lineList = []; + +const mapConfig = { + scene: { + center: { + lat: 31.686288, + lng: 117.229619, + // alt: 11333.9, + // heading: 359.2, + // pitch: -39.5, + alt: 12000, // 高度≈缩放级别 + heading: 30, // 旋转30度 + pitch: -45, // 俯视角45度 + }, + + highDynamicRange: false, // 关闭HDR(可减少模糊) + + scene3DOnly: false, + shadows: false, + removeDblClick: true, + sceneMode: 3, + showSun: true, + showMoon: true, + showSkyBox: true, + showSkyAtmosphere: true, + fog: true, + fxaa: false, + requestRenderMode: false, + globe: { + depthTestAgainstTerrain: false, + baseColor: "#546a53", + showGroundAtmosphere: true, + enableLighting: false, + }, + cameraController: { + zoomFactor: 3.0, + minimumZoomDistance: 1, + maximumZoomDistance: 50000000, + enableRotate: true, + enableTranslate: true, + enableTilt: true, + enableZoom: true, + enableCollisionDetection: true, + minimumCollisionTerrainHeight: 15000, + }, + }, + control: { + homeButton: true, + baseLayerPicker: true, + sceneModePicker: true, + vrButton: false, + fullscreenButton: true, + navigationHelpButton: true, + animation: false, + timeline: false, + infoBox: false, + geocoder: false, + selectionIndicator: false, + contextmenu: { hasDefault: false }, + mouseDownView: true, + zoom: { insertIndex: 1 }, + compass: { bottom: "toolbar", left: "5px" }, + distanceLegend: { left: "10px", bottom: "2px" }, + locationBar: { + fps: true, + crs: "CGCS2000_GK_Zone_3", + crsDecimal: 0, + template: + "
经度:{lng}
纬度:{lat}
横{crsx} 纵{crsy}
海拔:{alt}米
层级:{level}
方向:{heading}°
俯仰角:{pitch}°
视高:{cameraHeight}米
", + }, + }, + templateValues: { + dataServer: "//data.mars3d.cn", + gltfServerUrl: "//data.mars3d.cn/gltf", + }, + terrain: { + url: "//data.mars3d.cn/terrain", + show: true, + }, + basemaps: [ + { id: 10, name: "地图底图", type: "group" }, + { + id: 2021, + pid: 10, + name: "天地图影像", + icon: "../../../../img/mars-map-img/tdt_img.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "img_d" }, + { name: "注记", type: "tdt", layer: "img_z" }, + ], + show: true, + }, + { + pid: 10, + name: "天地图电子", + icon: "../../../../img/mars-map-img/tdt_vec.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "vec_d" }, + { name: "注记", type: "tdt", layer: "vec_z" }, + ], + }, + { + pid: 10, + name: "高德影像", + type: "group", + icon: "../../../../img/mars-map-img/gaode_img.png", + layers: [ + { name: "底图", type: "gaode", layer: "img_d" }, + { name: "注记", type: "gaode", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "高德电子", + type: "gaode", + icon: "../../../../img/mars-map-img/gaode_vec.png", + layer: "vec", + }, + { + pid: 10, + name: "百度影像", + type: "group", + icon: "../../../../img/mars-map-img/bd-img.png", + layers: [ + { name: "底图", type: "baidu", layer: "img_d" }, + { name: "注记", type: "baidu", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "百度电子", + icon: "../../../../img/mars-map-img/bd-vec.png", + type: "baidu", + layer: "vec", + }, + { + pid: 10, + name: "腾讯影像", + icon: "../../../../img/mars-map-img/tencent_img.png", + type: "group", + layers: [ + { name: "底图", type: "tencent", layer: "img_d" }, + { name: "注记", type: "tencent", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "腾讯电子", + icon: "../../../../img/mars-map-img/tencent_vec.png", + type: "tencent", + layer: "vec", + }, + { + pid: 10, + name: "ArcGIS影像", + icon: "../../../../img/mars-map-img/esriWorldImagery.png", + type: "xyz", + url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + enablePickFeatures: false, + }, + ], +}; function setParams(obj) { objParams = JSON.parse(obj); @@ -73,254 +240,426 @@ function initData() { // 百度地图初始化 function initMap(list) { - if (map) { - map = null; + // if (map) { + // map = null; + // } + // map = new BMapGL.Map("map-box"); + // // 以第一个点为中心初始化地图 + // map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); + + // map.setTilt(65); //设置地图的倾斜角度 + // map.enableScrollWheelZoom(true); // 启用滚轮缩放 + + // // 设置显示3D建筑物 + // map.setDisplayOptions({ + // building: true, // 显示3D建筑物 + // indoor: false, + // poi: true, + // }); + // var navigationControl = new BMapGL.NavigationControl3D(); + // map.addControl(navigationControl); + + // // 每次初始化的时候清除所有标点以及线 + // map.clearOverlays(); + // var styleJson = [ + // // 隐藏道路 + // { + // featureType: "highway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "arterial", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "local", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "railway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + + // // 保留背景、水域、绿地等(避免地图变空白) + // { + // featureType: "background", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "water", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "green", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + + // // 保留标点和文字(避免自定义点被隐藏) + // { + // featureType: "point", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "label", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // ]; + + // if (isMap) { + // // map.setMapType(BMAP_EARTH_MAP); // 地球模式 + // map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 + // /*map.setDisplayOptions({ + // poiText: false, // 隐藏POI文字 + // poiIcon: false, // 隐藏POI图标 + // building: false, // 隐藏建筑物 + // });*/ + // } else { + // map.setMapType(BMAP_NORMAL_MAP); // 普通模式 + + // // 增加不是纯白的背景色 + // map.setMapStyleV2({ + // styleJson: [ + // { + // featureType: "background", + // elementType: "all", + // stylers: { color: "#f5f5f5" }, + // }, + // ], + // }); + // } + + // if (isMap) { + // map.setMapStyleV2({ + // styleJson, + // }); + // } + // initTowerLine(list); + // if (objParams.points) { + // let points = JSON.parse(objParams.points); + // $.each(points, function (i, item) { + // addMarker(item.lng, item.lat); + // }); + // viewPointLine(); + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } else { + // // 点击地图添加标记 + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } + + if (!mars3d.Util.webglreport()) { + mars3d.Util.webglerror(); + return; } - map = new BMapGL.Map("map-box"); - // 以第一个点为中心初始化地图 - map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); - map.setTilt(65); //设置地图的倾斜角度 - map.enableScrollWheelZoom(true); // 启用滚轮缩放 + let intLng = ""; + let intLat = ""; + if (list.length > 0) { + intLng = list[Math.floor(list.length / 2)].lon; + intLat = list[Math.floor(list.length / 2)].lat; + } - // 设置显示3D建筑物 - map.setDisplayOptions({ - building: true, // 显示3D建筑物 - indoor: false, - poi: true, + // 3. 初始化新地图 + mapConfig.scene.center.lat = intLat || 31.686288; + mapConfig.scene.center.lng = intLng || 117.229619; + map = new mars3d.Map("map-box", mapConfig); + + // 4. 创建新的图形图层 + graphicLayer = new mars3d.layer.GraphicLayer(); + // graphicLayer2 = new mars3d.layer.GraphicLayer(); + + const centerPoint = [intLng, intLat]; + + map.flyToPoint(centerPoint, { + radius: 5000, // 可视范围半径(米) + duration: 5, // 飞行时间(秒) + heading: 0, // 视角方向(0-360度) + pitch: -45, // 俯仰角度(-90俯视,0平视,90仰视) }); - var navigationControl = new BMapGL.NavigationControl3D(); - map.addControl(navigationControl); - // 每次初始化的时候清除所有标点以及线 - map.clearOverlays(); - var styleJson = [ - // 隐藏道路 - { - featureType: "highway", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "arterial", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "local", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "railway", - elementType: "all", - stylers: { visibility: "off" }, - }, + map.addLayer(graphicLayer); - // 保留背景、水域、绿地等(避免地图变空白) - { - featureType: "background", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "water", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "green", - elementType: "all", - stylers: { visibility: "on" }, - }, - - // 保留标点和文字(避免自定义点被隐藏) - { - featureType: "point", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "label", - elementType: "all", - stylers: { visibility: "on" }, - }, - ]; - - if (isMap) { - // map.setMapType(BMAP_EARTH_MAP); // 地球模式 - map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 - /*map.setDisplayOptions({ - poiText: false, // 隐藏POI文字 - poiIcon: false, // 隐藏POI图标 - building: false, // 隐藏建筑物 - });*/ - } else { - map.setMapType(BMAP_NORMAL_MAP); // 普通模式 - - // 增加不是纯白的背景色 - map.setMapStyleV2({ - styleJson: [ - { - featureType: "background", - elementType: "all", - stylers: { color: "#f5f5f5" }, - }, - ], - }); - } - - if (isMap) { - map.setMapStyleV2({ - styleJson, - }); - } + // 先把杆塔进行标点 然后连线 initTowerLine(list); + if (objParams.points) { let points = JSON.parse(objParams.points); $.each(points, function (i, item) { addMarker(item.lng, item.lat); }); viewPointLine(); - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); - } else { - // 点击地图添加标记 - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); } + + map.on(mars3d.EventType.click, function (event) { + // 1. 获取点击位置的经纬度坐标 + const cartesian = event.cartesian; // 笛卡尔坐标 + if (!cartesian) return; + + // // 将笛卡尔坐标转换为经纬度 + const position = mars3d.LngLatPoint.fromCartesian(cartesian); + const lng = position.lng; // 经度 + const lat = position.lat; // 纬度 + + console.log("点击位置坐标-----:", lng, lat); + + addMarker(lng, lat); + }); } // 添加点坐标 function addMarker(lng, lat) { - console.log("markers标点集合", markers); - var point = new BMapGL.Point(lng, lat); - // 创建点标记 - var marker = new BMapGL.Marker(point); - // 添加到地图 - map.addOverlay(marker); + // console.log("markers标点集合", markers); + // var point = new BMapGL.Point(lng, lat); + // // 创建点标记 + // var marker = new BMapGL.Marker(point); + // // 添加到地图 + // map.addOverlay(marker); - // 创建标签 - // 2025-06-10 修改第一个标点名称为索道口 + // // 创建标签 + // // 2025-06-10 修改第一个标点名称为索道口 let markerName = ""; if (markers.length === 0) { markerName = "索道口"; } else { markerName = "点" + (markerCount + 1); } - var label = new BMapGL.Label(markerName, { - position: point, - offset: new BMapGL.Size(10, -30), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - // 存储标记和标签 - markers.push({ - marker: marker, - label: label, - point: point, - }); - console.log(markers); - // 更新计数器 + // var label = new BMapGL.Label(markerName, { + // position: point, + // offset: new BMapGL.Size(10, -30), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // // 存储标记和标签 + // markers.push({ + // marker: marker, + // label: label, + // point: point, + // }); + // console.log(markers); + // // 更新计数器 markerCount++; + + const billboard = new mars3d.graphic.BillboardEntity({ + position: [lng, lat, 1000], + style: { + image: "../../../../img/digitalSignage/sd.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: markerCount, + name: markerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [lng, lat], + style: { + html: `
${markerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + + markers.push({ + lng: lng, + lat: lat, + billboard: billboard, + label: label2, + }); } // 杆塔连线 function initTowerLine(points) { - // 存储所有点的坐标用于连线 - var linePoints = []; - // 添加点覆盖物和标签 - points.forEach(function (item, index) { - var point = new BMapGL.Point(item.lon, item.lat); - linePoints.push(point); // 添加到连线数组 - // 创建点标记 - var icon = new BMapGL.Icon( - "../../../../img/synthesisQuery/tower.png", - new BMapGL.Size(30, 66), - { - // 图标定位点 - anchor: new BMapGL.Size(15, 66), - } - ); - var marker = new BMapGL.Marker(point, { icon: icon }); - map.addOverlay(marker); - // 创建标签 - var label = new BMapGL.Label(item.towerName, { - position: point, - offset: new BMapGL.Size(20, -60), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - }); - // 创建连线 - var polyline = new BMapGL.Polyline(linePoints, { - strokeColor: "#FF0305", - strokeWeight: 6, - strokeOpacity: 0.8, - }); - map.addOverlay(polyline); - // 可选:自动调整视图以包含所有点 - map.setViewport(linePoints); - // 2. 获取视口边界和中心点 - var bounds = map.getBounds(); - var center = bounds.getCenter(); - // 3. 计算视口距离 - var viewportDistance = Math.max( - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(bounds.getSouthWest().lng, center.lat) - ), - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(center.lng, bounds.getSouthWest().lat) - ) - ); - // 4. 设置3D参数 - var zoom = map.getZoom(); - var newTilt = 65; - var newHeading = 30; + // // 存储所有点的坐标用于连线 + // var linePoints = []; + // // 添加点覆盖物和标签 + // points.forEach(function (item, index) { + // var point = new BMapGL.Point(item.lon, item.lat); + // linePoints.push(point); // 添加到连线数组 + // // 创建点标记 + // var icon = new BMapGL.Icon( + // "../../../../img/synthesisQuery/tower.png", + // new BMapGL.Size(30, 66), + // { + // // 图标定位点 + // anchor: new BMapGL.Size(15, 66), + // } + // ); + // var marker = new BMapGL.Marker(point, { icon: icon }); + // map.addOverlay(marker); + // // 创建标签 + // var label = new BMapGL.Label(item.towerName, { + // position: point, + // offset: new BMapGL.Size(20, -60), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // }); + // // 创建连线 + // var polyline = new BMapGL.Polyline(linePoints, { + // strokeColor: "#FF0305", + // strokeWeight: 6, + // strokeOpacity: 0.8, + // }); + // map.addOverlay(polyline); + // // 可选:自动调整视图以包含所有点 + // map.setViewport(linePoints); + // // 2. 获取视口边界和中心点 + // var bounds = map.getBounds(); + // var center = bounds.getCenter(); + // // 3. 计算视口距离 + // var viewportDistance = Math.max( + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(bounds.getSouthWest().lng, center.lat) + // ), + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(center.lng, bounds.getSouthWest().lat) + // ) + // ); + // // 4. 设置3D参数 + // var zoom = map.getZoom(); + // var newTilt = 65; + // var newHeading = 30; - // 5. 应用3D视角 - map.setTilt(newTilt); - map.setHeading(newHeading); + // // 5. 应用3D视角 + // map.setTilt(newTilt); + // map.setHeading(newHeading); - // 6. 稍微缩小以确保所有点在3D视角下可见 - setTimeout(function () { - map.setZoom(zoom - 1); - }, 100); + // // 6. 稍微缩小以确保所有点在3D视角下可见 + // setTimeout(function () { + // map.setZoom(zoom - 1); + // }, 100); + + points.forEach((item, index) => { + const billboard = new mars3d.graphic.BillboardEntity({ + position: [item.lon, item.lat, 1000], + style: { + image: "../../../../img/digitalSignage/icon_three_new.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: index, + name: item.towerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [item.lon, item.lat], + style: { + html: `
${item.towerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + }); + + for (let i = 0; i < points.length - 1; i++) { + const startPoint = points[i]; + const endPoint = points[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lon, startPoint.lat], + [endPoint.lon, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#FF0305", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + } } // 清除所有标点 document.getElementById("clearMarkers").addEventListener("click", function () { markers.forEach(function (item) { - map.removeOverlay(item.marker); - map.removeOverlay(item.label); + // map.removeOverlay(item.marker); + // map.removeOverlay(item.label); + graphicLayer.removeGraphic(item.billboard); + graphicLayer.removeGraphic(item.label); }); markers = []; console.log("markers标点集合", markers); markerCount = 0; - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } + if (lineList.length > 0) { + lineList.forEach((item) => { + graphicLayer.removeGraphic(item); + }); + lineList = []; } let frameId = parent.document @@ -338,22 +677,58 @@ function viewPointLine() { if (markers && markers.length === 0) { return layer.msg("请先创建点位", { icon: 7 }); } - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + + // 移除旧的索道线段 不要影响杆塔线段 + if (lineList.length > 0) { + lineList.forEach((item) => { + graphicLayer.removeGraphic(item); + }); + lineList = []; } - let points = []; - $.each(markers, function (index, item) { - points.push(item.point); - }); - // 2. 创建折线连接这些点位 - var polyline = new BMapGL.Polyline(points, { - strokeColor: "#0C14CA", // 线颜色 - strokeWeight: 4, // 线宽 - strokeOpacity: 0.8, // 线透明度 - }); - polylineView = polyline; - map.addOverlay(polyline); + + for (let i = 0; i < markers.length - 1; i++) { + const startPoint = markers[i]; + const endPoint = markers[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lng, startPoint.lat], + [endPoint.lng, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#0C14CA", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + lineList.push(polyline); + } + + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } + // let points = []; + // $.each(markers, function (index, item) { + // points.push(item.point); + // }); + // // 2. 创建折线连接这些点位 + // var polyline = new BMapGL.Polyline(points, { + // strokeColor: "#0C14CA", // 线颜色 + // strokeWeight: 4, // 线宽 + // strokeOpacity: 0.8, // 线透明度 + // }); + // polylineView = polyline; + // map.addOverlay(polyline); // 点击地图添加标记 // 2025-06-10 移除点击地图添加标记 解决连线之后 再次标点时标点展示异常问题 // map.addEventListener("click", function (e) { @@ -372,9 +747,14 @@ function saveData() { } let points = []; $.each(markers, function (index, item) { + // points.push({ + // lng: item.point.lng, + // lat: item.point.lat, + // sort: index + 1, + // }); points.push({ - lng: item.point.lng, - lat: item.point.lat, + lng: item.lng, + lat: item.lat, sort: index + 1, }); }); diff --git a/src/main/resources/static/js/basic/lineManagement/child/setQzSiteLonAndLat.js b/src/main/resources/static/js/basic/lineManagement/child/setQzSiteLonAndLat.js index ddcd8bf..ac2f799 100644 --- a/src/main/resources/static/js/basic/lineManagement/child/setQzSiteLonAndLat.js +++ b/src/main/resources/static/js/basic/lineManagement/child/setQzSiteLonAndLat.js @@ -7,6 +7,171 @@ let isMap = true; // 是否是地图模式 let markerCount = 0; // 标记点计数器 let markers = []; // 标记点数组 let polylineView = null; +let graphicLayer = null; +let lineList = []; +let graphicLayerList = []; +const mapConfig = { + scene: { + center: { + lat: 31.686288, + lng: 117.229619, + // alt: 11333.9, + // heading: 359.2, + // pitch: -39.5, + alt: 12000, // 高度≈缩放级别 + heading: 30, // 旋转30度 + pitch: -45, // 俯视角45度 + }, + + highDynamicRange: false, // 关闭HDR(可减少模糊) + + scene3DOnly: false, + shadows: false, + removeDblClick: true, + sceneMode: 3, + showSun: true, + showMoon: true, + showSkyBox: true, + showSkyAtmosphere: true, + fog: true, + fxaa: false, + requestRenderMode: false, + globe: { + depthTestAgainstTerrain: false, + baseColor: "#546a53", + showGroundAtmosphere: true, + enableLighting: false, + }, + cameraController: { + zoomFactor: 3.0, + minimumZoomDistance: 1, + maximumZoomDistance: 50000000, + enableRotate: true, + enableTranslate: true, + enableTilt: true, + enableZoom: true, + enableCollisionDetection: true, + minimumCollisionTerrainHeight: 15000, + }, + }, + control: { + homeButton: true, + baseLayerPicker: true, + sceneModePicker: true, + vrButton: false, + fullscreenButton: true, + navigationHelpButton: true, + animation: false, + timeline: false, + infoBox: false, + geocoder: false, + selectionIndicator: false, + contextmenu: { hasDefault: false }, + mouseDownView: true, + zoom: { insertIndex: 1 }, + compass: { bottom: "toolbar", left: "5px" }, + distanceLegend: { left: "10px", bottom: "2px" }, + locationBar: { + fps: true, + crs: "CGCS2000_GK_Zone_3", + crsDecimal: 0, + template: + "
经度:{lng}
纬度:{lat}
横{crsx} 纵{crsy}
海拔:{alt}米
层级:{level}
方向:{heading}°
俯仰角:{pitch}°
视高:{cameraHeight}米
", + }, + }, + templateValues: { + dataServer: "//data.mars3d.cn", + gltfServerUrl: "//data.mars3d.cn/gltf", + }, + terrain: { + url: "//data.mars3d.cn/terrain", + show: true, + }, + basemaps: [ + { id: 10, name: "地图底图", type: "group" }, + { + id: 2021, + pid: 10, + name: "天地图影像", + icon: "../../../../img/mars-map-img/tdt_img.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "img_d" }, + { name: "注记", type: "tdt", layer: "img_z" }, + ], + show: true, + }, + { + pid: 10, + name: "天地图电子", + icon: "../../../../img/mars-map-img/tdt_vec.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "vec_d" }, + { name: "注记", type: "tdt", layer: "vec_z" }, + ], + }, + { + pid: 10, + name: "高德影像", + type: "group", + icon: "../../../../img/mars-map-img/gaode_img.png", + layers: [ + { name: "底图", type: "gaode", layer: "img_d" }, + { name: "注记", type: "gaode", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "高德电子", + type: "gaode", + icon: "../../../../img/mars-map-img/gaode_vec.png", + layer: "vec", + }, + { + pid: 10, + name: "百度影像", + type: "group", + icon: "../../../../img/mars-map-img/bd-img.png", + layers: [ + { name: "底图", type: "baidu", layer: "img_d" }, + { name: "注记", type: "baidu", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "百度电子", + icon: "../../../../img/mars-map-img/bd-vec.png", + type: "baidu", + layer: "vec", + }, + { + pid: 10, + name: "腾讯影像", + icon: "../../../../img/mars-map-img/tencent_img.png", + type: "group", + layers: [ + { name: "底图", type: "tencent", layer: "img_d" }, + { name: "注记", type: "tencent", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "腾讯电子", + icon: "../../../../img/mars-map-img/tencent_vec.png", + type: "tencent", + layer: "vec", + }, + { + pid: 10, + name: "ArcGIS影像", + icon: "../../../../img/mars-map-img/esriWorldImagery.png", + type: "xyz", + url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + enablePickFeatures: false, + }, + ], +}; function setParams(obj) { objParams = JSON.parse(obj); @@ -73,134 +238,184 @@ function initData() { // 百度地图初始化 function initMap(list) { - if (map) { - map = null; + // if (map) { + // map = null; + // } + // map = new BMapGL.Map("map-box"); + // // 以第一个点为中心初始化地图 + // map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); + // map.setTilt(65); //设置地图的倾斜角度 + // map.enableScrollWheelZoom(true); // 启用滚轮缩放 + // // 设置显示3D建筑物 + // map.setDisplayOptions({ + // building: true, // 显示3D建筑物 + // indoor: false, + // poi: true, + // }); + // var navigationControl = new BMapGL.NavigationControl3D(); + // map.addControl(navigationControl); + // // 每次初始化的时候清除所有标点以及线 + // map.clearOverlays(); + // var styleJson = [ + // // 隐藏道路 + // { + // featureType: "highway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "arterial", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "local", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "railway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // // 保留背景、水域、绿地等(避免地图变空白) + // { + // featureType: "background", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "water", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "green", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // // 保留标点和文字(避免自定义点被隐藏) + // { + // featureType: "point", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "label", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // ]; + // if (isMap) { + // // map.setMapType(BMAP_EARTH_MAP); // 地球模式 + // map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 + // /*map.setDisplayOptions({ + // poiText: false, // 隐藏POI文字 + // poiIcon: false, // 隐藏POI图标 + // building: false, // 隐藏建筑物 + // });*/ + // } else { + // map.setMapType(BMAP_NORMAL_MAP); // 普通模式 + // // 增加不是纯白的背景色 + // map.setMapStyleV2({ + // styleJson: [ + // { + // featureType: "background", + // elementType: "all", + // stylers: { color: "#f5f5f5" }, + // }, + // ], + // }); + // } + // if (isMap) { + // map.setMapStyleV2({ + // styleJson, + // }); + // } + // initTowerLine(list); + // if (objParams.points) { + // let points = JSON.parse(objParams.points); + // $.each(points, function (i, item) { + // addMarker(item.lng, item.lat); + // }); + // viewPointLine(); + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } else { + // // 点击地图添加标记 + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } + + if (!mars3d.Util.webglreport()) { + mars3d.Util.webglerror(); + return; } - map = new BMapGL.Map("map-box"); - // 以第一个点为中心初始化地图 - map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); - map.setTilt(65); //设置地图的倾斜角度 - map.enableScrollWheelZoom(true); // 启用滚轮缩放 + let intLng = ""; + let intLat = ""; + if (list.length > 0) { + intLng = list[Math.floor(list.length / 2)].lon; + intLat = list[Math.floor(list.length / 2)].lat; + } - // 设置显示3D建筑物 - map.setDisplayOptions({ - building: true, // 显示3D建筑物 - indoor: false, - poi: true, + // 3. 初始化新地图 + mapConfig.scene.center.lat = intLat || 31.686288; + mapConfig.scene.center.lng = intLng || 117.229619; + map = new mars3d.Map("map-box", mapConfig); + + // 4. 创建新的图形图层 + graphicLayer = new mars3d.layer.GraphicLayer(); + // graphicLayer2 = new mars3d.layer.GraphicLayer(); + + const centerPoint = [intLng, intLat]; + + map.flyToPoint(centerPoint, { + radius: 5000, // 可视范围半径(米) + duration: 5, // 飞行时间(秒) + heading: 0, // 视角方向(0-360度) + pitch: -45, // 俯仰角度(-90俯视,0平视,90仰视) }); - var navigationControl = new BMapGL.NavigationControl3D(); - map.addControl(navigationControl); - // 每次初始化的时候清除所有标点以及线 - map.clearOverlays(); - var styleJson = [ - // 隐藏道路 - { - featureType: "highway", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "arterial", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "local", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "railway", - elementType: "all", - stylers: { visibility: "off" }, - }, + map.addLayer(graphicLayer); - // 保留背景、水域、绿地等(避免地图变空白) - { - featureType: "background", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "water", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "green", - elementType: "all", - stylers: { visibility: "on" }, - }, - - // 保留标点和文字(避免自定义点被隐藏) - { - featureType: "point", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "label", - elementType: "all", - stylers: { visibility: "on" }, - }, - ]; - - if (isMap) { - // map.setMapType(BMAP_EARTH_MAP); // 地球模式 - map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 - /*map.setDisplayOptions({ - poiText: false, // 隐藏POI文字 - poiIcon: false, // 隐藏POI图标 - building: false, // 隐藏建筑物 - });*/ - } else { - map.setMapType(BMAP_NORMAL_MAP); // 普通模式 - - // 增加不是纯白的背景色 - map.setMapStyleV2({ - styleJson: [ - { - featureType: "background", - elementType: "all", - stylers: { color: "#f5f5f5" }, - }, - ], - }); - } - - if (isMap) { - map.setMapStyleV2({ - styleJson, - }); - } + // 先把杆塔进行标点 然后连线 initTowerLine(list); + if (objParams.points) { let points = JSON.parse(objParams.points); $.each(points, function (i, item) { addMarker(item.lng, item.lat); }); viewPointLine(); - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); - } else { - // 点击地图添加标记 - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); } + + map.on(mars3d.EventType.click, function (event) { + // 1. 获取点击位置的经纬度坐标 + const cartesian = event.cartesian; // 笛卡尔坐标 + if (!cartesian) return; + + // // 将笛卡尔坐标转换为经纬度 + const position = mars3d.LngLatPoint.fromCartesian(cartesian); + const lng = position.lng; // 经度 + const lat = position.lat; // 纬度 + + console.log("点击位置坐标-----:", lng, lat); + + addMarker(lng, lat); + }); } // 添加点坐标 function addMarker(lng, lat) { - console.log("markers标点集合", markers); - var point = new BMapGL.Point(lng, lat); - // 创建点标记 - var marker = new BMapGL.Marker(point); - // 添加到地图 - map.addOverlay(marker); + // console.log("markers标点集合", markers); + // var point = new BMapGL.Point(lng, lat); + // // 创建点标记 + // var marker = new BMapGL.Marker(point); + // // 添加到地图 + // map.addOverlay(marker); // 创建标签 // 2025-06-10 修改第一个标点名称为索道口 @@ -210,109 +425,218 @@ function addMarker(lng, lat) { // } else { // markerName = "点" + (markerCount + 1); // } - var label = new BMapGL.Label(markerName, { - position: point, - offset: new BMapGL.Size(10, -30), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - // 存储标记和标签 - markers.push({ - marker: marker, - label: label, - point: point, - }); - console.log(markers); + // var label = new BMapGL.Label(markerName, { + // position: point, + // offset: new BMapGL.Size(10, -30), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // // 存储标记和标签 + // markers.push({ + // marker: marker, + // label: label, + // point: point, + // }); + // console.log(markers); // 更新计数器 markerCount++; + + const billboard = new mars3d.graphic.BillboardEntity({ + position: [lng, lat, 1000], + style: { + image: "../../../../img/digitalSignage/location.png", + width: 20, + height: 20, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: markerCount, + name: markerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [lng, lat], + style: { + html: `
${markerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + + markers.push({ + lng: lng, + lat: lat, + billboard: billboard, + label: label2, + }); } // 杆塔连线 function initTowerLine(points) { // 存储所有点的坐标用于连线 - var linePoints = []; - // 添加点覆盖物和标签 - points.forEach(function (item, index) { - var point = new BMapGL.Point(item.lon, item.lat); - linePoints.push(point); // 添加到连线数组 - // 创建点标记 - var icon = new BMapGL.Icon( - "../../../../img/synthesisQuery/tower.png", - new BMapGL.Size(30, 66), - { - // 图标定位点 - anchor: new BMapGL.Size(15, 66), - } - ); - var marker = new BMapGL.Marker(point, { icon: icon }); - map.addOverlay(marker); - // 创建标签 - var label = new BMapGL.Label(item.towerName, { - position: point, - offset: new BMapGL.Size(20, -60), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - }); - // 创建连线 - var polyline = new BMapGL.Polyline(linePoints, { - strokeColor: "#FF0305", - strokeWeight: 6, - strokeOpacity: 0.8, - }); - map.addOverlay(polyline); - // 可选:自动调整视图以包含所有点 - map.setViewport(linePoints); - // 2. 获取视口边界和中心点 - var bounds = map.getBounds(); - var center = bounds.getCenter(); - // 3. 计算视口距离 - var viewportDistance = Math.max( - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(bounds.getSouthWest().lng, center.lat) - ), - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(center.lng, bounds.getSouthWest().lat) - ) - ); - // 4. 设置3D参数 - var zoom = map.getZoom(); - var newTilt = 65; - var newHeading = 30; + // var linePoints = []; + // // 添加点覆盖物和标签 + // points.forEach(function (item, index) { + // var point = new BMapGL.Point(item.lon, item.lat); + // linePoints.push(point); // 添加到连线数组 + // // 创建点标记 + // var icon = new BMapGL.Icon( + // "../../../../img/synthesisQuery/tower.png", + // new BMapGL.Size(30, 66), + // { + // // 图标定位点 + // anchor: new BMapGL.Size(15, 66), + // } + // ); + // var marker = new BMapGL.Marker(point, { icon: icon }); + // map.addOverlay(marker); + // // 创建标签 + // var label = new BMapGL.Label(item.towerName, { + // position: point, + // offset: new BMapGL.Size(20, -60), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // }); + // // 创建连线 + // var polyline = new BMapGL.Polyline(linePoints, { + // strokeColor: "#FF0305", + // strokeWeight: 6, + // strokeOpacity: 0.8, + // }); + // map.addOverlay(polyline); + // // 可选:自动调整视图以包含所有点 + // map.setViewport(linePoints); + // // 2. 获取视口边界和中心点 + // var bounds = map.getBounds(); + // var center = bounds.getCenter(); + // // 3. 计算视口距离 + // var viewportDistance = Math.max( + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(bounds.getSouthWest().lng, center.lat) + // ), + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(center.lng, bounds.getSouthWest().lat) + // ) + // ); + // // 4. 设置3D参数 + // var zoom = map.getZoom(); + // var newTilt = 65; + // var newHeading = 30; - // 5. 应用3D视角 - map.setTilt(newTilt); - map.setHeading(newHeading); + // // 5. 应用3D视角 + // map.setTilt(newTilt); + // map.setHeading(newHeading); - // 6. 稍微缩小以确保所有点在3D视角下可见 - setTimeout(function () { - map.setZoom(zoom - 1); - }, 100); + // // 6. 稍微缩小以确保所有点在3D视角下可见 + // setTimeout(function () { + // map.setZoom(zoom - 1); + // }, 100); + + points.forEach((item, index) => { + const billboard = new mars3d.graphic.BillboardEntity({ + position: [item.lon, item.lat, 1000], + style: { + image: "../../../../img/digitalSignage/icon_three_new.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: index, + name: item.towerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [item.lon, item.lat], + style: { + html: `
${item.towerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + }); + + for (let i = 0; i < points.length - 1; i++) { + const startPoint = points[i]; + const endPoint = points[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lon, startPoint.lat], + [endPoint.lon, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#FF0305", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + } } // 清除所有标点和区域 document.getElementById("clearMarkers").addEventListener("click", function () { markers.forEach(function (item) { - map.removeOverlay(item.marker); - map.removeOverlay(item.label); + // map.removeOverlay(item.marker); + // map.removeOverlay(item.label); + + graphicLayer.removeGraphic(item.billboard); + graphicLayer.removeGraphic(item.label); }); markers = []; markerCount = 0; @@ -320,9 +644,16 @@ document.getElementById("clearMarkers").addEventListener("click", function () { map.removeOverlay(polylineView); // 移除旧的折线 polylineView = null; } - if (polygonView) { - map.removeOverlay(polygonView); // 移除旧的区域 - polygonView = null; + // if (polygonView) { + // map.removeOverlay(polygonView); // 移除旧的区域 + // polygonView = null; + // } + + if (graphicLayerList.length > 0) { + graphicLayerList.forEach((graphic) => { + graphic.remove(); // 移除每个区域 + }); + graphicLayerList = []; // 清空数组 } let frameId = parent.document .getElementById("addDataRopeway") @@ -339,35 +670,67 @@ function viewPointLine() { if (markers && markers.length === 0) { return layer.msg("请先创建点位", { icon: 7 }); } - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + + // 移除旧区域 + if (graphicLayerList.length > 0) { + graphicLayerList.forEach((graphic) => { + graphic.remove(); // 移除每个区域 + }); + graphicLayerList = []; // 清空数组 + } + let points = []; + markers.forEach((item) => { + points.push([item.lng, item.lat, 1000]); + lineList.push(item); + }); + + if (points.length > 0) { + const graphic = new mars3d.graphic.PolygonEntity({ + positions: points, + eventParent: false, + style: { + color: "#00FFFF", // 区域填充颜色 + opacity: 0.5, // 透明度(0-1) + outline: true, // 是否显示边框 + outlineWidth: 2, // 边框宽度(像素) + outlineColor: "#00FFFF", // 边框颜色 + clampToGround: true, + }, + attr: { remark: "示例区域" }, + }); + graphicLayer.addGraphic(graphic); + graphicLayerList.push(graphic); } - console.log("markers", markers); - let points = []; - $.each(markers, function (index, item) { - points.push(item.point); - }); - // 2. 创建折线连接这些点位 - var polyline = new BMapGL.Polyline(points, { - strokeColor: "#0C14CA", // 线颜色 - strokeWeight: 4, // 线宽 - strokeOpacity: 0.8, // 线透明度 - }); - polylineView = polyline; - map.addOverlay(polyline); + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } - // 绘制区域 - var polygon = new BMapGL.Polygon(points, { - strokeColor: "#00FFFF", // 线颜色 - strokeWeight: 4, // 线宽 - strokeOpacity: 0.8, // 线透明度 - fillColor: "#00FFFF", // 填充颜色 - fillOpacity: 0.3, // 填充透明度 - }); - polygonView = polygon; - map.addOverlay(polygon); + // console.log("markers", markers); + // let points = []; + // $.each(markers, function (index, item) { + // points.push(item.point); + // }); + // // 2. 创建折线连接这些点位 + // var polyline = new BMapGL.Polyline(points, { + // strokeColor: "#0C14CA", // 线颜色 + // strokeWeight: 4, // 线宽 + // strokeOpacity: 0.8, // 线透明度 + // }); + // polylineView = polyline; + // map.addOverlay(polyline); + + // // 绘制区域 + // var polygon = new BMapGL.Polygon(points, { + // strokeColor: "#00FFFF", // 线颜色 + // strokeWeight: 4, // 线宽 + // strokeOpacity: 0.8, // 线透明度 + // fillColor: "#00FFFF", // 填充颜色 + // fillOpacity: 0.3, // 填充透明度 + // }); + // polygonView = polygon; + // map.addOverlay(polygon); // 点击地图添加标记 // 2025-06-10 移除点击地图添加标记 解决连线之后 再次标点时标点展示异常问题 // map.addEventListener("click", function (e) { @@ -387,8 +750,11 @@ function saveData() { let points = []; $.each(markers, function (index, item) { points.push({ - lng: item.point.lng, - lat: item.point.lat, + // lng: item.point.lng, + // lat: item.point.lat, + + lng: item.lng, + lat: item.lat, sort: index + 1, }); }); diff --git a/src/main/resources/static/js/basic/lineManagement/child/setSpanTowerLonAndLat.js b/src/main/resources/static/js/basic/lineManagement/child/setSpanTowerLonAndLat.js index fb58826..d68bfc8 100644 --- a/src/main/resources/static/js/basic/lineManagement/child/setSpanTowerLonAndLat.js +++ b/src/main/resources/static/js/basic/lineManagement/child/setSpanTowerLonAndLat.js @@ -7,6 +7,171 @@ let isMap = true; // 是否是地图模式 let markerCount = 0; // 标记点计数器 let markers = []; // 标记点数组 let polylineView = null; +let graphicLayer = null; +let lineList = []; + +const mapConfig = { + scene: { + center: { + lat: 31.686288, + lng: 117.229619, + // alt: 11333.9, + // heading: 359.2, + // pitch: -39.5, + alt: 12000, // 高度≈缩放级别 + heading: 30, // 旋转30度 + pitch: -45, // 俯视角45度 + }, + + highDynamicRange: false, // 关闭HDR(可减少模糊) + + scene3DOnly: false, + shadows: false, + removeDblClick: true, + sceneMode: 3, + showSun: true, + showMoon: true, + showSkyBox: true, + showSkyAtmosphere: true, + fog: true, + fxaa: false, + requestRenderMode: false, + globe: { + depthTestAgainstTerrain: false, + baseColor: "#546a53", + showGroundAtmosphere: true, + enableLighting: false, + }, + cameraController: { + zoomFactor: 3.0, + minimumZoomDistance: 1, + maximumZoomDistance: 50000000, + enableRotate: true, + enableTranslate: true, + enableTilt: true, + enableZoom: true, + enableCollisionDetection: true, + minimumCollisionTerrainHeight: 15000, + }, + }, + control: { + homeButton: true, + baseLayerPicker: true, + sceneModePicker: true, + vrButton: false, + fullscreenButton: true, + navigationHelpButton: true, + animation: false, + timeline: false, + infoBox: false, + geocoder: false, + selectionIndicator: false, + contextmenu: { hasDefault: false }, + mouseDownView: true, + zoom: { insertIndex: 1 }, + compass: { bottom: "toolbar", left: "5px" }, + distanceLegend: { left: "10px", bottom: "2px" }, + locationBar: { + fps: true, + crs: "CGCS2000_GK_Zone_3", + crsDecimal: 0, + template: + "
经度:{lng}
纬度:{lat}
横{crsx} 纵{crsy}
海拔:{alt}米
层级:{level}
方向:{heading}°
俯仰角:{pitch}°
视高:{cameraHeight}米
", + }, + }, + templateValues: { + dataServer: "//data.mars3d.cn", + gltfServerUrl: "//data.mars3d.cn/gltf", + }, + terrain: { + url: "//data.mars3d.cn/terrain", + show: true, + }, + basemaps: [ + { id: 10, name: "地图底图", type: "group" }, + { + id: 2021, + pid: 10, + name: "天地图影像", + icon: "../../../../img/mars-map-img/tdt_img.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "img_d" }, + { name: "注记", type: "tdt", layer: "img_z" }, + ], + show: true, + }, + { + pid: 10, + name: "天地图电子", + icon: "../../../../img/mars-map-img/tdt_vec.png", + type: "group", + layers: [ + { name: "底图", type: "tdt", layer: "vec_d" }, + { name: "注记", type: "tdt", layer: "vec_z" }, + ], + }, + { + pid: 10, + name: "高德影像", + type: "group", + icon: "../../../../img/mars-map-img/gaode_img.png", + layers: [ + { name: "底图", type: "gaode", layer: "img_d" }, + { name: "注记", type: "gaode", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "高德电子", + type: "gaode", + icon: "../../../../img/mars-map-img/gaode_vec.png", + layer: "vec", + }, + { + pid: 10, + name: "百度影像", + type: "group", + icon: "../../../../img/mars-map-img/bd-img.png", + layers: [ + { name: "底图", type: "baidu", layer: "img_d" }, + { name: "注记", type: "baidu", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "百度电子", + icon: "../../../../img/mars-map-img/bd-vec.png", + type: "baidu", + layer: "vec", + }, + { + pid: 10, + name: "腾讯影像", + icon: "../../../../img/mars-map-img/tencent_img.png", + type: "group", + layers: [ + { name: "底图", type: "tencent", layer: "img_d" }, + { name: "注记", type: "tencent", layer: "img_z" }, + ], + }, + { + pid: 10, + name: "腾讯电子", + icon: "../../../../img/mars-map-img/tencent_vec.png", + type: "tencent", + layer: "vec", + }, + { + pid: 10, + name: "ArcGIS影像", + icon: "../../../../img/mars-map-img/esriWorldImagery.png", + type: "xyz", + url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", + enablePickFeatures: false, + }, + ], +}; function setParams(obj) { objParams = JSON.parse(obj); @@ -73,254 +238,429 @@ function initData() { // 百度地图初始化 function initMap(list) { - if (map) { - map = null; + // if (map) { + // map = null; + // } + // map = new BMapGL.Map("map-box"); + // // 以第一个点为中心初始化地图 + // map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); + + // map.setTilt(65); //设置地图的倾斜角度 + // map.enableScrollWheelZoom(true); // 启用滚轮缩放 + + // // 设置显示3D建筑物 + // map.setDisplayOptions({ + // building: true, // 显示3D建筑物 + // indoor: false, + // poi: true, + // }); + // var navigationControl = new BMapGL.NavigationControl3D(); + // map.addControl(navigationControl); + + // // 每次初始化的时候清除所有标点以及线 + // map.clearOverlays(); + // var styleJson = [ + // // 隐藏道路 + // { + // featureType: "highway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "arterial", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "local", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + // { + // featureType: "railway", + // elementType: "all", + // stylers: { visibility: "off" }, + // }, + + // // 保留背景、水域、绿地等(避免地图变空白) + // { + // featureType: "background", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "water", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "green", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + + // // 保留标点和文字(避免自定义点被隐藏) + // { + // featureType: "point", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // { + // featureType: "label", + // elementType: "all", + // stylers: { visibility: "on" }, + // }, + // ]; + + // if (isMap) { + // // map.setMapType(BMAP_EARTH_MAP); // 地球模式 + // map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 + // /*map.setDisplayOptions({ + // poiText: false, // 隐藏POI文字 + // poiIcon: false, // 隐藏POI图标 + // building: false, // 隐藏建筑物 + // });*/ + // } else { + // map.setMapType(BMAP_NORMAL_MAP); // 普通模式 + + // // 增加不是纯白的背景色 + // map.setMapStyleV2({ + // styleJson: [ + // { + // featureType: "background", + // elementType: "all", + // stylers: { color: "#f5f5f5" }, + // }, + // ], + // }); + // } + + // if (isMap) { + // map.setMapStyleV2({ + // styleJson, + // }); + // } + // initTowerLine(list); + // if (objParams.points) { + // let points = JSON.parse(objParams.points); + // if (points.length > 0) { + // $.each(points, function (i, item) { + // addMarker(item.lng || item.lon, item.lat || item.lat); + // }); + // viewPointLine(); + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } + // } else { + // // 点击地图添加标记 + // map.addEventListener("click", function (e) { + // addMarker(e.latlng.lng, e.latlng.lat); + // }); + // } + + if (!mars3d.Util.webglreport()) { + mars3d.Util.webglerror(); + return; } - map = new BMapGL.Map("map-box"); - // 以第一个点为中心初始化地图 - map.centerAndZoom(new BMapGL.Point(intLng, intLat), 16); - map.setTilt(65); //设置地图的倾斜角度 - map.enableScrollWheelZoom(true); // 启用滚轮缩放 + let intLng = ""; + let intLat = ""; + if (list.length > 0) { + intLng = list[Math.floor(list.length / 2)].lon; + intLat = list[Math.floor(list.length / 2)].lat; + } - // 设置显示3D建筑物 - map.setDisplayOptions({ - building: true, // 显示3D建筑物 - indoor: false, - poi: true, + // 3. 初始化新地图 + mapConfig.scene.center.lat = intLat || 31.686288; + mapConfig.scene.center.lng = intLng || 117.229619; + map = new mars3d.Map("map-box", mapConfig); + + // 4. 创建新的图形图层 + graphicLayer = new mars3d.layer.GraphicLayer(); + // graphicLayer2 = new mars3d.layer.GraphicLayer(); + + const centerPoint = [intLng, intLat]; + + map.flyToPoint(centerPoint, { + radius: 5000, // 可视范围半径(米) + duration: 5, // 飞行时间(秒) + heading: 0, // 视角方向(0-360度) + pitch: -45, // 俯仰角度(-90俯视,0平视,90仰视) }); - var navigationControl = new BMapGL.NavigationControl3D(); - map.addControl(navigationControl); - // 每次初始化的时候清除所有标点以及线 - map.clearOverlays(); - var styleJson = [ - // 隐藏道路 - { - featureType: "highway", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "arterial", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "local", - elementType: "all", - stylers: { visibility: "off" }, - }, - { - featureType: "railway", - elementType: "all", - stylers: { visibility: "off" }, - }, + map.addLayer(graphicLayer); - // 保留背景、水域、绿地等(避免地图变空白) - { - featureType: "background", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "water", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "green", - elementType: "all", - stylers: { visibility: "on" }, - }, - - // 保留标点和文字(避免自定义点被隐藏) - { - featureType: "point", - elementType: "all", - stylers: { visibility: "on" }, - }, - { - featureType: "label", - elementType: "all", - stylers: { visibility: "on" }, - }, - ]; - - if (isMap) { - // map.setMapType(BMAP_EARTH_MAP); // 地球模式 - map.setMapType(BMAP_SATELLITE_MAP); // 地球模式 - /*map.setDisplayOptions({ - poiText: false, // 隐藏POI文字 - poiIcon: false, // 隐藏POI图标 - building: false, // 隐藏建筑物 - });*/ - } else { - map.setMapType(BMAP_NORMAL_MAP); // 普通模式 - - // 增加不是纯白的背景色 - map.setMapStyleV2({ - styleJson: [ - { - featureType: "background", - elementType: "all", - stylers: { color: "#f5f5f5" }, - }, - ], - }); - } - - if (isMap) { - map.setMapStyleV2({ - styleJson, - }); - } + // 先把杆塔进行标点 然后连线 initTowerLine(list); + if (objParams.points) { let points = JSON.parse(objParams.points); - if (points.length > 0) { - $.each(points, function (i, item) { - addMarker(item.lng || item.lon, item.lat || item.lat); - }); - viewPointLine(); - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); - }); - } - } else { - // 点击地图添加标记 - map.addEventListener("click", function (e) { - addMarker(e.latlng.lng, e.latlng.lat); + $.each(points, function (i, item) { + addMarker(item.lng, item.lat); }); + viewPointLine(); } + + map.on(mars3d.EventType.click, function (event) { + // 1. 获取点击位置的经纬度坐标 + const cartesian = event.cartesian; // 笛卡尔坐标 + if (!cartesian) return; + + // // 将笛卡尔坐标转换为经纬度 + const position = mars3d.LngLatPoint.fromCartesian(cartesian); + const lng = position.lng; // 经度 + const lat = position.lat; // 纬度 + + console.log("点击位置坐标-----:", lng, lat); + + addMarker(lng, lat); + }); } // 添加点坐标 function addMarker(lng, lat) { - console.log("markers标点集合", markers); - var point = new BMapGL.Point(lng, lat); - // 创建点标记 - var marker = new BMapGL.Marker(point); - // 添加到地图 - map.addOverlay(marker); + // console.log("markers标点集合", markers); + // var point = new BMapGL.Point(lng, lat); + // // 创建点标记 + // var marker = new BMapGL.Marker(point); + // // 添加到地图 + // map.addOverlay(marker); // 创建标签 // 2025-06-10 修改第一个标点名称为索道口 - // let markerName = ""; + let markerName = ""; // if (markers.length === 0) { // markerName = "公路口"; // } else { // markerName = "点" + (markerCount + 1); // } - var label = new BMapGL.Label("杆塔" + (markerCount + 1), { - position: point, - offset: new BMapGL.Size(10, -30), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - // 存储标记和标签 - markers.push({ - marker: marker, - label: label, - point: point, - }); - console.log(markers); + + markerName = "跨越杆塔" + (markerCount + 1); + // var label = new BMapGL.Label("杆塔" + (markerCount + 1), { + // position: point, + // offset: new BMapGL.Size(10, -30), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // // 存储标记和标签 + // markers.push({ + // marker: marker, + // label: label, + // point: point, + // }); + // console.log(markers); // 更新计数器 markerCount++; + + const billboard = new mars3d.graphic.BillboardEntity({ + position: [lng, lat], + style: { + image: "../../../../img/digitalSignage/zt_white.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: markerCount, + name: markerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [lng, lat], + style: { + html: `
${markerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + + markers.push({ + lng: lng, + lat: lat, + billboard: billboard, + label: label2, + }); } // 杆塔连线 function initTowerLine(points) { - // 存储所有点的坐标用于连线 - var linePoints = []; - // 添加点覆盖物和标签 - points.forEach(function (item, index) { - var point = new BMapGL.Point(item.lon, item.lat); - linePoints.push(point); // 添加到连线数组 - // 创建点标记 - var icon = new BMapGL.Icon( - "../../../../img/synthesisQuery/tower.png", - new BMapGL.Size(30, 66), - { - // 图标定位点 - anchor: new BMapGL.Size(15, 66), - } - ); - var marker = new BMapGL.Marker(point, { icon: icon }); - map.addOverlay(marker); - // 创建标签 - var label = new BMapGL.Label(item.towerName, { - position: point, - offset: new BMapGL.Size(20, -60), - }); - label.setStyle({ - color: "#333", - fontSize: "12px", - fontWeight: "bold", - backgroundColor: "rgba(255,255,255,0.9)", - border: "1px solid #ddd", - borderRadius: "4px", - padding: "2px 6px", - }); - map.addOverlay(label); - }); - // 创建连线 - var polyline = new BMapGL.Polyline(linePoints, { - strokeColor: "#FF0305", - strokeWeight: 6, - strokeOpacity: 0.8, - }); - map.addOverlay(polyline); - // 可选:自动调整视图以包含所有点 - map.setViewport(linePoints); - // 2. 获取视口边界和中心点 - var bounds = map.getBounds(); - var center = bounds.getCenter(); - // 3. 计算视口距离 - var viewportDistance = Math.max( - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(bounds.getSouthWest().lng, center.lat) - ), - BMapGL.Map.prototype.getDistance( - center, - new BMapGL.Point(center.lng, bounds.getSouthWest().lat) - ) - ); - // 4. 设置3D参数 - var zoom = map.getZoom(); - var newTilt = 65; - var newHeading = 30; + // // 存储所有点的坐标用于连线 + // var linePoints = []; + // // 添加点覆盖物和标签 + // points.forEach(function (item, index) { + // var point = new BMapGL.Point(item.lon, item.lat); + // linePoints.push(point); // 添加到连线数组 + // // 创建点标记 + // var icon = new BMapGL.Icon( + // "../../../../img/synthesisQuery/tower.png", + // new BMapGL.Size(30, 66), + // { + // // 图标定位点 + // anchor: new BMapGL.Size(15, 66), + // } + // ); + // var marker = new BMapGL.Marker(point, { icon: icon }); + // map.addOverlay(marker); + // // 创建标签 + // var label = new BMapGL.Label(item.towerName, { + // position: point, + // offset: new BMapGL.Size(20, -60), + // }); + // label.setStyle({ + // color: "#333", + // fontSize: "12px", + // fontWeight: "bold", + // backgroundColor: "rgba(255,255,255,0.9)", + // border: "1px solid #ddd", + // borderRadius: "4px", + // padding: "2px 6px", + // }); + // map.addOverlay(label); + // }); + // // 创建连线 + // var polyline = new BMapGL.Polyline(linePoints, { + // strokeColor: "#FF0305", + // strokeWeight: 6, + // strokeOpacity: 0.8, + // }); + // map.addOverlay(polyline); + // // 可选:自动调整视图以包含所有点 + // map.setViewport(linePoints); + // // 2. 获取视口边界和中心点 + // var bounds = map.getBounds(); + // var center = bounds.getCenter(); + // // 3. 计算视口距离 + // var viewportDistance = Math.max( + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(bounds.getSouthWest().lng, center.lat) + // ), + // BMapGL.Map.prototype.getDistance( + // center, + // new BMapGL.Point(center.lng, bounds.getSouthWest().lat) + // ) + // ); + // // 4. 设置3D参数 + // var zoom = map.getZoom(); + // var newTilt = 65; + // var newHeading = 30; - // 5. 应用3D视角 - map.setTilt(newTilt); - map.setHeading(newHeading); + // // 5. 应用3D视角 + // map.setTilt(newTilt); + // map.setHeading(newHeading); - // 6. 稍微缩小以确保所有点在3D视角下可见 - setTimeout(function () { - map.setZoom(zoom - 1); - }, 100); + // // 6. 稍微缩小以确保所有点在3D视角下可见 + // setTimeout(function () { + // map.setZoom(zoom - 1); + // }, 100); + + points.forEach((item, index) => { + const billboard = new mars3d.graphic.BillboardEntity({ + position: [item.lon, item.lat], + style: { + image: "../../../../img/digitalSignage/icon_three_new.png", + width: 30, + height: 30, + scale: 1, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + clampToGround: true, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, // 必须设置 + disableDepthTestDistance: Number.POSITIVE_INFINITY, // 防止被地形遮挡 + }, + // 其他属性 + attr: { + id: index, + name: item.towerName, + }, + }); + + const label2 = new mars3d.graphic.DivGraphic({ + position: [item.lon, item.lat], + style: { + html: `
${item.towerName}
`, + horizontalOrigin: Cesium.HorizontalOrigin.CENTER, + verticalOrigin: Cesium.VerticalOrigin.TOP, + scaleByDistance: true, + offsetY: -60, + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + disableDepthTestDistance: Number.POSITIVE_INFINITY, + }, + }); + + graphicLayer.addGraphic(billboard); + graphicLayer.addGraphic(label2); + }); + + for (let i = 0; i < points.length - 1; i++) { + const startPoint = points[i]; + const endPoint = points[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lon, startPoint.lat], + [endPoint.lon, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#FF0305", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + } } // 清除所有标点 document.getElementById("clearMarkers").addEventListener("click", function () { markers.forEach(function (item) { - map.removeOverlay(item.marker); - map.removeOverlay(item.label); + // map.removeOverlay(item.marker); + // map.removeOverlay(item.label); + graphicLayer.removeGraphic(item.billboard); + graphicLayer.removeGraphic(item.label); }); markers = []; markerCount = 0; - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } + + if (lineList.length > 0) { + lineList.forEach((item) => { + graphicLayer.removeGraphic(item); + }); + lineList = []; } let frameId = parent.document @@ -338,22 +678,57 @@ function viewPointLine() { if (markers && markers.length === 0) { return layer.msg("请先创建点位", { icon: 7 }); } - if (polylineView) { - map.removeOverlay(polylineView); // 移除旧的折线 - polylineView = null; + + // 移除旧的索道线段 不要影响杆塔线段 + if (lineList.length > 0) { + lineList.forEach((item) => { + graphicLayer.removeGraphic(item); + }); + lineList = []; } - let points = []; - $.each(markers, function (index, item) { - points.push(item.point); - }); - // 2. 创建折线连接这些点位 - var polyline = new BMapGL.Polyline(points, { - strokeColor: "#0C14CA", // 线颜色 - strokeWeight: 4, // 线宽 - strokeOpacity: 0.8, // 线透明度 - }); - polylineView = polyline; - map.addOverlay(polyline); + + for (let i = 0; i < markers.length - 1; i++) { + const startPoint = markers[i]; + const endPoint = markers[i + 1]; + + // 创建线段点数组 + const positions = [ + [startPoint.lng, startPoint.lat], + [endPoint.lng, endPoint.lat], + ]; + + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); + + const polyline = new mars3d.graphic.PolylineEntity({ + positions: positions, + eventParent: false, + style: { + width: 2, // 线宽(像素) + color: "#0C14CA", // 线颜色 + clampToGround: true, // 是否贴地(山区建议设为true) + }, + }); + graphicLayer.addGraphic(polyline); + lineList.push(polyline); + } + // if (polylineView) { + // map.removeOverlay(polylineView); // 移除旧的折线 + // polylineView = null; + // } + // let points = []; + // $.each(markers, function (index, item) { + // points.push(item.point); + // }); + // // 2. 创建折线连接这些点位 + // var polyline = new BMapGL.Polyline(points, { + // strokeColor: "#0C14CA", // 线颜色 + // strokeWeight: 4, // 线宽 + // strokeOpacity: 0.8, // 线透明度 + // }); + // polylineView = polyline; + // map.addOverlay(polyline); // 点击地图添加标记 // 2025-06-10 移除点击地图添加标记 解决连线之后 再次标点时标点展示异常问题 // map.addEventListener("click", function (e) { @@ -378,8 +753,11 @@ function saveData() { let points = []; $.each(markers, function (index, item) { points.push({ - lng: item.point.lng, - lat: item.point.lat, + // lng: item.point.lng, + // lat: item.point.lat, + + lng: item.lng, + lat: item.lat, sort: index + 1, }); }); diff --git a/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js b/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js index c5311b8..c83d218 100644 --- a/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js +++ b/src/main/resources/static/js/synthesisQuery/digitalSignage-new.js @@ -4,2510 +4,7 @@ let graphicLayerList = []; // 图形图层列表 let treeData = []; // 组织机构树数据 let nodeId = ""; // 当前选中的节点ID let cablewayList = []; // 索道列表 -let towerList = [ - { - id: 159, - towerName: "N1625", - baiduLon: "106.88646740334597", - baiduLat: "33.700951744939616", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: "2025-05-18", - time5: "2025-05-18", - time6: "2025-05-18", - time7: "2025-05-18", - time8: "2025-06-08", - time9: "2025-06-08", - time10: null, - existSpan: 0, - towerProgress: 9, - }, - { - id: 160, - towerName: "N1626", - baiduLon: "106.89028474086506", - baiduLat: "33.69829100705979", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: "2025-05-18", - time5: "2025-05-18", - time6: "2025-05-18", - time7: "2025-05-18", - time8: "2025-06-08", - time9: "2025-06-08", - time10: null, - existSpan: 0, - towerProgress: 9, - }, - { - id: 161, - towerName: "N1627", - baiduLon: "106.89238887950556", - baiduLat: "33.69682637914991", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: "2025-05-18", - time5: "2025-05-18", - time6: "2025-05-18", - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 6, - }, - { - id: 162, - towerName: "N1628", - baiduLon: "106.89738088775557", - baiduLat: "33.69483372250299", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: "2025-05-18", - time5: "2025-05-18", - time6: "2025-05-18", - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 1, - towerProgress: 6, - }, - { - id: 163, - towerName: "N1629", - baiduLon: "106.9003291662435", - baiduLat: "33.69379532140319", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: "2025-05-18", - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 1, - towerProgress: 4, - }, - { - id: 164, - towerName: "N1630", - baiduLon: "106.90434036919319", - baiduLat: "33.6923821685985", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 3, - }, - { - id: 165, - towerName: "N1631", - baiduLon: "106.9096172171291", - baiduLat: "33.69051553273442", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-05-18", - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 3, - }, - { - id: 166, - towerName: "N1632", - baiduLon: "106.91221471544226", - baiduLat: "33.68959255444022", - time1: "2025-05-18", - time2: "2025-05-18", - time3: "2025-06-05", - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 3, - }, - { - id: 167, - towerName: "N1633", - baiduLon: "106.9180613717821", - baiduLat: "33.687501736760396", - time1: "2025-05-18", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 168, - towerName: "N1634", - baiduLon: "106.92270655632997", - baiduLat: "33.68582552709554", - time1: "2025-05-18", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 169, - towerName: "N1635", - baiduLon: "106.92498856210685", - baiduLat: "33.68499621636022", - time1: "2025-05-18", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 170, - towerName: "N1636", - baiduLon: "106.9305267748522", - baiduLat: "33.68296873362536", - time1: "2025-05-18", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 171, - towerName: "N1637", - baiduLon: "106.9329949967278", - baiduLat: "33.68205848602869", - time1: "2025-05-18", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 172, - towerName: "N1638", - baiduLon: "106.93828466115669", - baiduLat: "33.676992660601165", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 173, - towerName: "N1639", - baiduLon: "106.94173374844513", - baiduLat: "33.673683202707814", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 174, - towerName: "N1640", - baiduLon: "106.94649706492352", - baiduLat: "33.66910694957852", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 175, - towerName: "N1641", - baiduLon: "106.95359152748001", - baiduLat: "33.66228180606567", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 176, - towerName: "N1642", - baiduLon: "106.9598697289315", - baiduLat: "33.65624025801406", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 177, - towerName: "N1643", - baiduLon: "106.96707458963886", - baiduLat: "33.64931335834796", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 178, - towerName: "N1644", - baiduLon: "106.96752385868376", - baiduLat: "33.646090556494485", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 179, - towerName: "N1645", - baiduLon: "106.96965840581376", - baiduLat: "33.64015145834369", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 180, - towerName: "N1646", - baiduLon: "106.97066438335538", - baiduLat: "33.63780210059811", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 181, - towerName: "N1647", - baiduLon: "106.97433064932336", - baiduLat: "33.63459112065854", - time1: "2025-06-08", - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 1, - }, - { - id: 182, - towerName: "N1648", - baiduLon: "106.97975442670015", - baiduLat: "33.62985340560501", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 183, - towerName: "N1649", - baiduLon: "106.98257619354851", - baiduLat: "33.62739517838416", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 184, - towerName: "N1650", - baiduLon: "106.98691118503437", - baiduLat: "33.62362824988726", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 185, - towerName: "N1651", - baiduLon: "106.98875401791942", - baiduLat: "33.622030228307125", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 186, - towerName: "N1652", - baiduLon: "106.99127147684132", - baiduLat: "33.614651140748265", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 187, - towerName: "N1653", - baiduLon: "106.99810080408797", - baiduLat: "33.612189708638155", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 188, - towerName: "N1654", - baiduLon: "107.0002526011955", - baiduLat: "33.6114208962854", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 189, - towerName: "N1655", - baiduLon: "107.00211025515449", - baiduLat: "33.61075951665829", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 190, - towerName: "N1656", - baiduLon: "107.00387012732007", - baiduLat: "33.6101344207792", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 191, - towerName: "N1657", - baiduLon: "107.01253439155236", - baiduLat: "33.60970614045862", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 192, - towerName: "N1658", - baiduLon: "107.01491490461564", - baiduLat: "33.60775702990676", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 193, - towerName: "N1659", - baiduLon: "107.01944532671492", - baiduLat: "33.604048083850465", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 194, - towerName: "N1660", - baiduLon: "107.02210449781295", - baiduLat: "33.60186988881606", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 195, - towerName: "N1661", - baiduLon: "107.02660556526162", - baiduLat: "33.59817819719097", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 196, - towerName: "N1662", - baiduLon: "107.03310085996674", - baiduLat: "33.594569469746865", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 197, - towerName: "N1663", - baiduLon: "107.03946534101858", - baiduLat: "33.59100952543835", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 198, - towerName: "N1664", - baiduLon: "107.04324516097589", - baiduLat: "33.58515597961924", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 199, - towerName: "N1665", - baiduLon: "107.04406869332647", - baiduLat: "33.57639158525642", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 200, - towerName: "N1666", - baiduLon: "107.0444066517986", - baiduLat: "33.572808311936555", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 201, - towerName: "N1667", - baiduLon: "107.04468075276424", - baiduLat: "33.5699062730769", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 202, - towerName: "N1668", - baiduLon: "107.04522799379407", - baiduLat: "33.564127717224785", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 203, - towerName: "N1669", - baiduLon: "107.04577208252945", - baiduLat: "33.558394186880136", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 204, - towerName: "N1670", - baiduLon: "107.0476355403751", - baiduLat: "33.5552376694631", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 205, - towerName: "N1671", - baiduLon: "107.0507857531852", - baiduLat: "33.54989774018444", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 206, - towerName: "N1672", - baiduLon: "107.05228450385073", - baiduLat: "33.548689726233455", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 207, - towerName: "N1673", - baiduLon: "107.05489548398486", - baiduLat: "33.54658158464499", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 208, - towerName: "N1674", - baiduLon: "107.05684436089078", - baiduLat: "33.54379581710383", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 209, - towerName: "N1675", - baiduLon: "107.05879303713415", - baiduLat: "33.54100838095082", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 210, - towerName: "N1676", - baiduLon: "107.06111635626243", - baiduLat: "33.538994336040695", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 211, - towerName: "N1677", - baiduLon: "107.06317325004818", - baiduLat: "33.53720875592299", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 212, - towerName: "N1678", - baiduLon: "107.06439658363134", - baiduLat: "33.536145577990986", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 213, - towerName: "N1679", - baiduLon: "107.06762079766484", - baiduLat: "33.53502747746021", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 214, - towerName: "N1680", - baiduLon: "107.06930516644195", - baiduLat: "33.53444167638022", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 215, - towerName: "N1681", - baiduLon: "107.07624864581945", - baiduLat: "33.53342191892645", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 216, - towerName: "N1682", - baiduLon: "107.08154363582442", - baiduLat: "33.5310902462067", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 217, - towerName: "N1683", - baiduLon: "107.08993563986478", - baiduLat: "33.52740394448912", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 218, - towerName: "N1684", - baiduLon: "107.09557267697534", - baiduLat: "33.52494258953695", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 219, - towerName: "N1685", - baiduLon: "107.10037727447943", - baiduLat: "33.52285837121811", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 220, - towerName: "N1686", - baiduLon: "107.10364750780478", - baiduLat: "33.52158862562809", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 221, - towerName: "N1687", - baiduLon: "107.10846453262809", - baiduLat: "33.51973223148524", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 222, - towerName: "N1688", - baiduLon: "107.11181360703068", - baiduLat: "33.51909205195407", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 223, - towerName: "N1689", - baiduLon: "107.1190312146702", - baiduLat: "33.51774007671119", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 224, - towerName: "N1690", - baiduLon: "107.12327793191801", - baiduLat: "33.517539827710856", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 225, - towerName: "N1691", - baiduLon: "107.13086378394082", - baiduLat: "33.51720350226726", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 226, - towerName: "N1692", - baiduLon: "107.13616355549898", - baiduLat: "33.51697698928074", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 227, - towerName: "N1693", - baiduLon: "107.14071279493577", - baiduLat: "33.51678244906243", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 228, - towerName: "N1694", - baiduLon: "107.14305988460197", - baiduLat: "33.51668042575018", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 229, - towerName: "N1695", - baiduLon: "107.15334861272618", - baiduLat: "33.51924451640732", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 230, - towerName: "N1696", - baiduLon: "107.15824908235453", - baiduLat: "33.5204400901242", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 231, - towerName: "N1697", - baiduLon: "107.16202273226484", - baiduLat: "33.52134654031544", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 232, - towerName: "N1698", - baiduLon: "107.17055131491561", - baiduLat: "33.52011467981102", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 233, - towerName: "N1699", - baiduLon: "107.17815871406033", - baiduLat: "33.51896559856658", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 234, - towerName: "N1700", - baiduLon: "107.18001059744363", - baiduLat: "33.51867917069031", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 235, - towerName: "N1701", - baiduLon: "107.18606800246044", - baiduLat: "33.51772899954368", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 236, - towerName: "N1702", - baiduLon: "107.18920326565288", - baiduLat: "33.51723052211384", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 237, - towerName: "N1703", - baiduLon: "107.19660835559884", - baiduLat: "33.5175057248704", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 238, - towerName: "N1704", - baiduLon: "107.20533103305648", - baiduLat: "33.515565363481976", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 239, - towerName: "N1705", - baiduLon: "107.20862535724639", - baiduLat: "33.51574013897916", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 240, - towerName: "N1706", - baiduLon: "107.21325768073731", - baiduLat: "33.51599615824992", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 241, - towerName: "N1707", - baiduLon: "107.22178964471689", - baiduLat: "33.51650862624162", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 242, - towerName: "N1708", - baiduLon: "107.22665447356256", - baiduLat: "33.51537989876462", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 243, - towerName: "N1709", - baiduLon: "107.23400914823021", - baiduLat: "33.51371143843012", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 244, - towerName: "N1710", - baiduLon: "107.23820334156078", - baiduLat: "33.512779775414145", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 245, - towerName: "N1711", - baiduLon: "107.24164261532059", - baiduLat: "33.51202508648184", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 246, - towerName: "N1712", - baiduLon: "107.2498494998087", - baiduLat: "33.51025173724062", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 247, - towerName: "N1713", - baiduLon: "107.25439894212967", - baiduLat: "33.509063677486544", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 248, - towerName: "N1714", - baiduLon: "107.26123725021769", - baiduLat: "33.50728244108538", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 249, - towerName: "N1715", - baiduLon: "107.26442692232902", - baiduLat: "33.50644924751708", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 250, - towerName: "N1716", - baiduLon: "107.27231543218565", - baiduLat: "33.504374917282064", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 251, - towerName: "N1717", - baiduLon: "107.27630860132699", - baiduLat: "33.50331292798974", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 252, - towerName: "N1718", - baiduLon: "107.28093765204066", - baiduLat: "33.50206852113215", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 253, - towerName: "N1719", - baiduLon: "107.2851483278103", - baiduLat: "33.50092191348861", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 254, - towerName: "N1720", - baiduLon: "107.28861003397485", - baiduLat: "33.49996904944689", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 255, - towerName: "N1721", - baiduLon: "107.29470024712839", - baiduLat: "33.49827086210862", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 256, - towerName: "N1722", - baiduLon: "107.29921837953546", - baiduLat: "33.496994333529614", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 257, - towerName: "N1723", - baiduLon: "107.30362201120606", - baiduLat: "33.49769765852011", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 258, - towerName: "N1724", - baiduLon: "107.30828207421504", - baiduLat: "33.49843051993899", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 259, - towerName: "N1725", - baiduLon: "107.31409706627703", - baiduLat: "33.49798814696198", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 260, - towerName: "N1726", - baiduLon: "107.31636291865334", - baiduLat: "33.49781449994312", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 261, - towerName: "N1727", - baiduLon: "107.3198278246054", - baiduLat: "33.49754936191977", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 262, - towerName: "N1728", - baiduLon: "107.32388024657631", - baiduLat: "33.49724169044543", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 263, - towerName: "N1729", - baiduLon: "107.32694773744468", - baiduLat: "33.49701234734956", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 264, - towerName: "N1730", - baiduLon: "107.33237601593673", - baiduLat: "33.49598376231999", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 265, - towerName: "N1731", - baiduLon: "107.3338979538333", - baiduLat: "33.49594040770004", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 266, - towerName: "N1732", - baiduLon: "107.33825910838863", - baiduLat: "33.49582498784957", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 267, - towerName: "N1733", - baiduLon: "107.34265738747352", - baiduLat: "33.49572295968462", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 268, - towerName: "N1734", - baiduLon: "107.34744807384682", - baiduLat: "33.49563121548856", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 269, - towerName: "N1735", - baiduLon: "107.35415843337002", - baiduLat: "33.49468099740889", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 270, - towerName: "N1736", - baiduLon: "107.35983608078578", - baiduLat: "33.49390418100815", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 271, - towerName: "N1737", - baiduLon: "107.3629757874049", - baiduLat: "33.49348357598333", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 272, - towerName: "N1738", - baiduLon: "107.3662575682128", - baiduLat: "33.49337463496614", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 273, - towerName: "N1739", - baiduLon: "107.37031162711268", - baiduLat: "33.49324630623058", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 274, - towerName: "N1740", - baiduLon: "107.37489273391161", - baiduLat: "33.49310620895069", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 275, - towerName: "N1741", - baiduLon: "107.38263855060835", - baiduLat: "33.493148459160025", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 276, - towerName: "N1742", - baiduLon: "107.3853909663863", - baiduLat: "33.49389025029422", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 277, - towerName: "N1743", - baiduLon: "107.38773358951195", - baiduLat: "33.4945190264539", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 278, - towerName: "N1744", - baiduLon: "107.3942417607591", - baiduLat: "33.49472608679089", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 279, - towerName: "N1745", - baiduLon: "107.39840136440802", - baiduLat: "33.494842163647505", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 280, - towerName: "N1746", - baiduLon: "107.40232115718632", - baiduLat: "33.494938295900155", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 281, - towerName: "N1747", - baiduLon: "107.40438390695732", - baiduLat: "33.49498310332439", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 282, - towerName: "N1748", - baiduLon: "107.41076280338682", - baiduLat: "33.49509720529899", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 283, - towerName: "N1749", - baiduLon: "107.4175326828727", - baiduLat: "33.495178335363036", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 284, - towerName: "N1750", - baiduLon: "107.42050988504761", - baiduLat: "33.49511370873718", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 285, - towerName: "N1751", - baiduLon: "107.42455074159426", - baiduLat: "33.495016233125526", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 286, - towerName: "N1752", - baiduLon: "107.43179273512058", - baiduLat: "33.494820826744615", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 287, - towerName: "N1753", - baiduLon: "107.43610584249222", - baiduLat: "33.49422958063155", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 288, - towerName: "N1754", - baiduLon: "107.4379616887375", - baiduLat: "33.49397443366867", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 289, - towerName: "N1755", - baiduLon: "107.44135107997957", - baiduLat: "33.493508803401774", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 290, - towerName: "N1756", - baiduLon: "107.44978864589918", - baiduLat: "33.4945634721474", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 291, - towerName: "N1757", - baiduLon: "107.45428852797096", - baiduLat: "33.49238466612214", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 292, - towerName: "N1758", - baiduLon: "107.4578430824247", - baiduLat: "33.49067103361664", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 293, - towerName: "N1759", - baiduLon: "107.46391238275316", - baiduLat: "33.487762960678936", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 294, - towerName: "N1760", - baiduLon: "107.46879495116076", - baiduLat: "33.48487973912042", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 295, - towerName: "N1761", - baiduLon: "107.47170139267237", - baiduLat: "33.48317094602991", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 296, - towerName: "N1762", - baiduLon: "107.47594219910523", - baiduLat: "33.48068725015285", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, - { - id: 297, - towerName: "N1801", - baiduLon: "107.48230598604319", - baiduLat: "33.47759644323532", - time1: null, - time2: null, - time3: null, - time4: null, - time5: null, - time6: null, - time7: null, - time8: null, - time9: null, - time10: null, - existSpan: 0, - towerProgress: 0, - }, -]; // 塔列表 +let towerList = []; // 塔列表 let crossingList = []; // 跨越列表 let crossingListNew = []; // 跨越列表 let highwayList = []; // 公路列表 @@ -2810,7 +307,7 @@ function getLocationInfo(id) { crossingList = []; crossingListNew = []; cablewayList = []; - // towerList = []; + towerList = []; if (data.cablewaTransVos.length > 0) { cablewayList = data.cablewaTransVos; @@ -2818,9 +315,9 @@ function getLocationInfo(id) { cablewayList = []; } if (data.towerInfoVos.length > 0) { - // towerList = data.towerInfoVos; + towerList = data.towerInfoVos; } else { - // towerList = []; + towerList = []; } if (data.spanInfoVos.length > 0) { crossingList = data.spanInfoVos; @@ -2999,12 +496,16 @@ async function addAllMapPoints() { pointData.cablewaTransPointVoList && pointData.cablewaTransPointVoList.length > 0 ) { - const positionNew = mars3d.PointTrans.bd2wgs([ - pointData.cablewaTransPointVoList[0].lng, - pointData.cablewaTransPointVoList[0].lat, - ]); + // const positionNew = mars3d.PointTrans.bd2wgs([ + // pointData.cablewaTransPointVoList[0].lng, + // pointData.cablewaTransPointVoList[0].lat, + // ]); const billboard = new mars3d.graphic.BillboardEntity({ - position: [positionNew[0], positionNew[1], 1000], + position: [ + pointData.cablewaTransPointVoList[0].lng, + pointData.cablewaTransPointVoList[0].lat, + 1000, + ], style: { image: iconTypeList[12], width: 30, @@ -3065,9 +566,9 @@ async function addAllMapPoints() { // 绘制项目部 if (intLng && intLat) { - const positionNew = mars3d.PointTrans.bd2wgs([intLng, intLat]); + // const positionNew = mars3d.PointTrans.bd2wgs([intLng, intLat]); const billboard = new mars3d.graphic.BillboardEntity({ - position: [positionNew[0], positionNew[1], 1000], + position: [intLng, intLat, 1000], style: { image: iconTypeList[20], width: 30, @@ -3115,13 +616,18 @@ async function addAllMapPoints() { const iconUrl = iconTypeList[parseInt(pointData.towerProgress)]; - const wgsPoint = mars3d.PointTrans.bd2wgs([ - pointData.baiduLon, - pointData.baiduLat, - ]); + // const wgsPoint = mars3d.PointTrans.bd2wgs([ + // pointData.baiduLon, + // pointData.baiduLat, + // ]); + + // const wgsPoint = [ + // dmsToDecimal(pointData.baiduLon), + // dmsToDecimal(pointData.baiduLat), + // ]; const billboard = new mars3d.graphic.BillboardEntity({ - position: wgsPoint, + position: [pointData.baiduLon, pointData.baiduLat], style: { image: iconUrl, width: 30, @@ -3141,7 +647,7 @@ async function addAllMapPoints() { }); const label2 = new mars3d.graphic.DivGraphic({ - position: wgsPoint, + position: [pointData.baiduLon, pointData.baiduLat], style: { html: `
${pointData.towerName}
`, horizontalOrigin: Cesium.HorizontalOrigin.CENTER, @@ -3218,12 +724,12 @@ async function addAllMapPoints() { // 绘制交叉跨越 if (crossingListNew.length > 0) { crossingListNew.forEach((pointData, index) => { - const positionNew = mars3d.PointTrans.bd2wgs([ - pointData.baiduLon, - pointData.baiduLat, - ]); + // const positionNew = mars3d.PointTrans.bd2wgs([ + // pointData.baiduLon, + // pointData.baiduLat, + // ]); const billboard = new mars3d.graphic.BillboardEntity({ - position: [positionNew[0], positionNew[1], 1000], + position: [pointData.baiduLon, pointData.baiduLat, 1000], style: { image: iconTypeList[21], width: 30, @@ -3411,12 +917,12 @@ async function addMapLine() { [endPoint.baiduLon, endPoint.baiduLat], ]; - const positions2 = positions.map((item) => { - return mars3d.PointTrans.bd2wgs(item); - }); + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); const polyline = new mars3d.graphic.PolylineEntity({ - positions: positions2, + positions: positions, eventParent: false, style: { width: 2, // 线宽(像素) @@ -3440,12 +946,12 @@ async function addMapLine() { [endPoint.baiduLon, endPoint.baiduLat], ]; - const positions2 = positions.map((item) => { - return mars3d.PointTrans.bd2wgs(item); - }); + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); const polyline = new mars3d.graphic.PolylineEntity({ - positions: positions2, + positions: positions, eventParent: false, style: { width: 2, // 线宽(像素) @@ -3478,12 +984,12 @@ async function addMapLine() { [endPoint.lng, endPoint.lat], ]; - const positions2 = positions.map((item) => { - return mars3d.PointTrans.bd2wgs(item); - }); + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); const polyline = new mars3d.graphic.PolylineEntity({ - positions: positions2, + positions: positions, eventParent: false, style: { width: 2, // 线宽(像素) @@ -3517,12 +1023,12 @@ async function addMapLine() { [endPoint.lng, endPoint.lat], ]; - const positions2 = positions.map((item) => { - return mars3d.PointTrans.bd2wgs(item); - }); + // const positions2 = positions.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); const polyline = new mars3d.graphic.PolylineEntity({ - positions: positions2, + positions: positions, eventParent: false, style: { width: 2, // 线宽(像素) @@ -3554,13 +1060,13 @@ async function addMapAThousandFields() { points.push([j.lng, j.lat]); }); - const positions2 = points.map((item) => { - return mars3d.PointTrans.bd2wgs(item); - }); + // const positions2 = points.map((item) => { + // return mars3d.PointTrans.bd2wgs(item); + // }); if (points.length > 0) { const graphic = new mars3d.graphic.PolygonEntity({ - positions: positions2, + positions: points, eventParent: false, style: { color: "#00FFFF", // 区域填充颜色 diff --git a/src/main/resources/static/pages/basic/lineManagement/child/setHighwayLonAndLat.html b/src/main/resources/static/pages/basic/lineManagement/child/setHighwayLonAndLat.html index 3f61394..3fd9055 100644 --- a/src/main/resources/static/pages/basic/lineManagement/child/setHighwayLonAndLat.html +++ b/src/main/resources/static/pages/basic/lineManagement/child/setHighwayLonAndLat.html @@ -14,6 +14,23 @@ + + + + + + + + + + + + + + + + + 配置公路口、中转口经纬度 diff --git a/src/main/resources/static/pages/basic/lineManagement/child/setLonAndLat.html b/src/main/resources/static/pages/basic/lineManagement/child/setLonAndLat.html index c13b43b..822e3ed 100644 --- a/src/main/resources/static/pages/basic/lineManagement/child/setLonAndLat.html +++ b/src/main/resources/static/pages/basic/lineManagement/child/setLonAndLat.html @@ -14,6 +14,23 @@ + + + + + + + + + + + + + + + + + 配置索道口、中转口经纬度 diff --git a/src/main/resources/static/pages/basic/lineManagement/child/setQzSiteLonAndLat.html b/src/main/resources/static/pages/basic/lineManagement/child/setQzSiteLonAndLat.html index a237a67..574cc8d 100644 --- a/src/main/resources/static/pages/basic/lineManagement/child/setQzSiteLonAndLat.html +++ b/src/main/resources/static/pages/basic/lineManagement/child/setQzSiteLonAndLat.html @@ -14,6 +14,21 @@ + + + + + + + + + + + + + + + 配置牵张场地、区域经纬度 diff --git a/src/main/resources/static/pages/basic/lineManagement/child/setSpanTowerLonAndLat.html b/src/main/resources/static/pages/basic/lineManagement/child/setSpanTowerLonAndLat.html index 22cef5e..5e5698e 100644 --- a/src/main/resources/static/pages/basic/lineManagement/child/setSpanTowerLonAndLat.html +++ b/src/main/resources/static/pages/basic/lineManagement/child/setSpanTowerLonAndLat.html @@ -14,6 +14,22 @@ + + + + + + + + + + + + + + + + 配置公路口、中转口经纬度 diff --git a/src/main/resources/static/pages/basic/lineManagement/child/towerFormTemp.html b/src/main/resources/static/pages/basic/lineManagement/child/towerFormTemp.html index c10235e..de6ec4e 100644 --- a/src/main/resources/static/pages/basic/lineManagement/child/towerFormTemp.html +++ b/src/main/resources/static/pages/basic/lineManagement/child/towerFormTemp.html @@ -91,7 +91,7 @@
+ placeholder="请输入经度(大约73.55°E至135.08°E)" class="layui-input">
@@ -99,7 +99,7 @@
+ placeholder="请输入纬度(大约4°N至53°N)" class="layui-input">
@@ -118,7 +118,7 @@
+ placeholder="请输入经度(大约73.55°E至135.08°E)" class="layui-input">
@@ -126,7 +126,7 @@
+ placeholder="请输入纬度(大约4°N至53°N)" class="layui-input">