This commit is contained in:
BianLzhaoMin 2025-04-30 10:26:59 +08:00
parent f07eebb2a5
commit 7c980e9a4e
1 changed files with 17 additions and 15 deletions

View File

@ -307,16 +307,16 @@ function addAllMapPoints() {
// 绘制索道标点 // 绘制索道标点
if (cablewayList && cablewayList.length > 0) { if (cablewayList && cablewayList.length > 0) {
cablewayList.forEach((pointData, index) => { cablewayList.forEach((pointData, index) => {
const pointKey = `117.132663,31.877325`; // const pointKey = `117.132663,31.877325`;
// const pointKey = `${pointData.baiduLon},${pointData.baiduLat}`; const pointKey = `${pointData.baiduLon},${pointData.baiduLat}`;
// 如果该坐标点已经添加过标记,则跳过 // 如果该坐标点已经添加过标记,则跳过
if (addedPoints[pointKey]) { // if (addedPoints[pointKey]) {
console.warn(`重复的点坐标被跳过: ${pointKey}`); // console.warn(`重复的点坐标被跳过: ${pointKey}`);
return; // return;
} // }
addedPoints[pointKey] = true; // addedPoints[pointKey] = true;
// const point = new BMapGL.Point( // const point = new BMapGL.Point(
// pointData.baiduLon, // pointData.baiduLon,
// pointData.baiduLat // pointData.baiduLat
@ -327,7 +327,7 @@ function addAllMapPoints() {
// 检查图标是否存在,不存在则使用默认图标 // 检查图标是否存在,不存在则使用默认图标
const iconUrl = iconTypeList[9]; // 默认使用第一个图标 const iconUrl = iconTypeList[9]; // 默认使用第一个图标
const myIcon = new BMapGL.Icon(iconUrl, new BMapGL.Size(40, 38), { const myIcon = new BMapGL.Icon(iconUrl, new BMapGL.Size(40, 38), {
anchor: new BMapGL.Size(16, 20), // 修正锚点位置为中心底部 anchor: new BMapGL.Size(32, 40), // 修正锚点位置为中心底部
imageSize: new BMapGL.Size(40, 38), // 与实际图片尺寸一致 imageSize: new BMapGL.Size(40, 38), // 与实际图片尺寸一致
}); });
@ -407,12 +407,14 @@ function addAllMapPoints() {
const pointKey = `${pointData.baiduLon},${pointData.baiduLat}`; const pointKey = `${pointData.baiduLon},${pointData.baiduLat}`;
// const pointKey = `116.254,39.965`; // const pointKey = `116.254,39.965`;
// 如果该坐标点已经添加过标记,则跳过 // 如果该坐标点已经添加过标记,则跳过
if (addedPoints[pointKey]) { // if (addedPoints[pointKey]) {
console.warn(`重复的点坐标被跳过: ${pointKey}`); // console.warn(`重复的点坐标被跳过: ${pointKey}`);
return; // return;
} // }
addedPoints[pointKey] = true; // addedPoints[pointKey] = true;
if (pointData.towerProgress == 0) return;
const point = new BMapGL.Point( const point = new BMapGL.Point(
pointData.baiduLon, pointData.baiduLon,
pointData.baiduLat pointData.baiduLat
@ -784,8 +786,8 @@ function getOrgTreeData() {
data[0].children[0].children[0].lon && data[0].children[0].children[0].lon &&
data[0].children[0].children[0].lat data[0].children[0].children[0].lat
) { ) {
// intLng = data[0].children[0].children[0].lon; intLng = data[0].children[0].children[0].lon;
// intLat = data[0].children[0].children[0].lat; intLat = data[0].children[0].children[0].lat;
} }
getScrollData(nodeId); getScrollData(nodeId);