소스 검색

优化地图视角与功能

彭宇 3 주 전
부모
커밋
a5ea1a556b
2개의 변경된 파일18개의 추가작업 그리고 4개의 파일을 삭제
  1. 13 4
      src/components/supermap-2.5d.vue
  2. 5 0
      src/views/Cockpit.vue

+ 13 - 4
src/components/supermap-2.5d.vue

@@ -223,8 +223,11 @@ export default {
             }
           }, 100 * i)
         }
-        // that.scene.open('http://116.142.80.12:8090/iserver/services/3D-SiPingReLi/rest/realspace')
+        // that.scene.open({
+        //   autoSetView : false      //不自动定位
+        // },'http://116.142.80.12:8090/iserver/services/3D-SiPingReLi/rest/realspace')
         // that.scene.open('http://116.142.80.12:8090/iserver/services/3D-huashengranqi/rest/realspace')
+        // that.scene.open('http://116.142.80.12:8090/iserver/services/3D-reli_yici_erci_guanduan/rest/realspace');
       }, 2000)
       that.viewer.selectedEntityChanged.addEventListener(function(entity) {
         if (entity != undefined && Reflect.has(entity, 'layerID')) {
@@ -306,6 +309,8 @@ export default {
         }
       });
       that.handler = new SuperMap3D.ScreenSpaceEventHandler(that.scene.canvas);
+      that.scene.open('http://116.142.80.12:8090/iserver/services/3D-reli_yici_erci_guanduan/rest/realspace')
+      that.scene.open('http://116.142.80.12:8090/iserver/services/3D-huashengranqi/rest/realspace');
       that.flyTo(longitude, latitude, height)
       //设置鼠标左键单击回调事件
       that.handler.setInputAction(function (e) {
@@ -501,7 +506,9 @@ export default {
     addOpen_model(sort, uri) {
       let that = this
       // that.dataMap[sort] = that.scene.open(that.superMapRootUrl + uri)
-      let obj = that.dataMap[sort] = that.scene.open(that.superMapRootUrl + uri)
+      let obj = that.dataMap[sort] = that.scene.open({
+        autoSetView : false      //不自动定位
+      },that.superMapRootUrl + uri)
       //开始加载专题图等数据,8秒后开始执行
       setTimeout(function () {
         /**
@@ -800,7 +807,9 @@ export default {
     },
     addOpen(id, uri) {
       let that = this;
-      let obj = that.scene.open(that.superMapRootUrl + uri)
+      let obj = that.scene.open({
+        autoSetView : false      //不自动定位
+      },that.superMapRootUrl + uri)
       that.dataMap[id] = obj
       return obj;
     },
@@ -1305,7 +1314,7 @@ export default {
       let that = this
       setTimeout(function() {
         that.viewer.camera.setView({
-          destination: new SuperMap3D.Cartesian3.fromDegrees(Number(longitude)+Number(0.1), Number(latitude)-Number(1.3), Number(140000)),
+          destination: new SuperMap3D.Cartesian3.fromDegrees(Number(longitude)-Number(0.115), Number(latitude)-Number(0.27), Number(6000)),
           orientation: {
             heading:  SuperMap3D.Math.toRadians(0),
             pitch:  SuperMap3D.Math.toRadians(-45),

+ 5 - 0
src/views/Cockpit.vue

@@ -54,6 +54,7 @@
                   <button class="map_btn_span" @click="choseMeasuringDistance()">测距</button>
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
+<!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
                 <a class="map_clear" @click="clearAll()">清除</a>
               </el-tab-pane>
@@ -71,6 +72,7 @@
                   <button class="map_btn_span" @click="choseMeasuringDistance()">测距</button>
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button></div>
+<!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 <a class="map_clear" @click="clearAll()">清除</a>
               </el-tab-pane>
               <el-tab-pane label="供水" name="three">
@@ -87,6 +89,7 @@
                   <button class="map_btn_span" @click="choseMeasuringDistance()">测距</button>
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
+<!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
                 <a class="map_clear" @click="clearAll()">清除</a>
               </el-tab-pane>
@@ -104,6 +107,7 @@
                   <button class="map_btn_span" @click="choseMeasuringDistance()">测距</button>
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
+<!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
                 <a class="map_clear" @click="clearAll()">清除</a>
               </el-tab-pane>
@@ -129,6 +133,7 @@
                   <button class="map_btn_span" @click="choseMeasuringDistance()">测距</button>
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
+<!--              <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
                 <a class="map_clear" @click="clearAll()">清除</a>
               </el-tab-pane>