Forráskód Böngészése

地名地址点击添加飞入动画,并恢复垂直视角。
二维地图选中关闭默认飞入事件(中心点位的问题,请修改DMS中c_bbox字段数据)。

DESKTOP-6LTVLN7\Liumouren 1 éve
szülő
commit
fbafa8cea1
2 módosított fájl, 10 hozzáadás és 6 törlés
  1. 6 3
      scripts/layout/user.js
  2. 4 3
      scripts/mod/layerVue/raster.js

+ 6 - 3
scripts/layout/user.js

@@ -585,13 +585,16 @@ define(['html!templates/user',
     // 定位到指定的坐标
     ONEMAP.C.publisher.subscribe(function (data) {
         let localAddr = coordinate.shcj_to_wgs84(data.x, data.y);
-        map23DControl.setView({
+        map23DData.view.pitch = -90;
+        map3DViewer.flyTo({
             center: {
                 lat: localAddr[1],
                 lng: localAddr[0]
             },
-            zoom: 18
-        })
+            zoom: 18,
+            heading: 0, //摄像机平面角度 正北为0
+            tilt: 0, //摄像机倾斜角
+        });
     }, 'orientationToMap');
 
     // 根据条件渲染地名地址结果View  - 刘梦祥 fuzzy:如果返回的结果是精准查找的话,点击Item后要有单独的处理事件并隐藏View

+ 4 - 3
scripts/mod/layerVue/raster.js

@@ -191,9 +191,10 @@ define(function () {
         var bbox = JSON.parse(items.c_bbox)
         var extentR = turf.bbox(bbox);
         Cesium.Rectangle.fromDegrees(extentR[0], extentR[1], extentR[2], extentR[3])
-        map3DViewer.map.camera.flyTo({
-            destination: Cesium.Rectangle.fromDegrees(extentR[0], extentR[1], extentR[2], extentR[3]),
-        });
+        // 二维地图定位异常,注释掉 刘梦祥
+        // map3DViewer.map.camera.flyTo({
+        //     destination: Cesium.Rectangle.fromDegrees(extentR[0], extentR[1], extentR[2], extentR[3]),
+        // });
         modValue.RASTER[guid] = layer
         modValue.RASTER[guid + "_extent"] = extentR
         return guid;