月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-09-04 1355c04087927dfed32827d23609e2b04a8cabea
src/components/mouseMove.vue
@@ -141,7 +141,7 @@
    // 当前高度
    let height = Viewer.camera.positionCartographic.height;
    heightlevel = getLevel(height);
    console.log(heightlevel);
    if (heightlevel == 6) {
      gridDel();
      grid(5);
@@ -178,7 +178,7 @@
  //     ])
  //   );
  // }
  // console.log(ps);
  // let polylineGeometry = new Cesium.PolylineGeometry({
  //   positions: ps,
  //   width: 5,
@@ -203,16 +203,6 @@
const grid = (degree) => {
  const entities = Viewer.entities;
  for (let longitude = -180; longitude <= 180; longitude += degree) {
    console.log(
      Cesium.Cartesian3.fromDegreesArray([
        longitude,
        -90,
        longitude,
        0,
        longitude,
        90,
      ])
    );
    let text = "";
    if (longitude === 0) {
      text = "0";
@@ -260,7 +250,7 @@
    if (lat === 0) {
      text = "";
    }
    // console.log(lat, "---lat");
    let obj = entities.add({
      position: Cesium.Cartesian3.fromDegrees(0, lat),
      polyline: {
@@ -291,7 +281,7 @@
    });
    entitiesObj.latLine.push(obj);
  }
  console.log(entitiesObj);
  // 抗锯齿
  if (Cesium.FeatureDetection.supportsImageRenderingPixelated()) {
    //判断是否支持图像渲染像素化处理