|
@@ -72,7 +72,7 @@ export default {
|
|
|
position: positions, //区域
|
|
|
height: this.height, //开挖深度
|
|
|
transparent: false, //封边是否透明
|
|
|
- extractHeight: this.height, //抽出高度
|
|
|
+ extractHeight: Number(this.height), //抽出高度
|
|
|
granularity: 1 //精度
|
|
|
});
|
|
|
},
|
|
@@ -103,16 +103,16 @@ export default {
|
|
|
}
|
|
|
// 闭合多边形,添加第一个点
|
|
|
wktPolygon += `, ${coords[0]} ${coords[1]}))`;
|
|
|
- console.log('wktPolygon: ', wktPolygon);
|
|
|
|
|
|
return wktPolygon;
|
|
|
},
|
|
|
- async smooth_ana(positions,positions_noHeight) {
|
|
|
+ async smooth_ana(positions, positions_noHeight) {
|
|
|
+ console.log('positions: ', positions);
|
|
|
+ console.log('positions_noHeight: ', positions_noHeight);
|
|
|
let data = await getDsm({
|
|
|
"geom": this.coordsToWktPolygon(positions_noHeight),
|
|
|
'type': 'min'
|
|
|
});
|
|
|
- console.log(data.data);
|
|
|
|
|
|
|
|
|
viewer.scene.globe.removeAllExcavationRegion();
|
|
@@ -184,6 +184,7 @@ export default {
|
|
|
var longitude = Cesium.Math.toDegrees(cartographic.longitude);
|
|
|
var latitude = Cesium.Math.toDegrees(cartographic.latitude);
|
|
|
var h = cartographic.height;
|
|
|
+ console.log('h: ', h);
|
|
|
if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) {
|
|
|
positions.push(longitude);
|
|
|
positions.push(latitude);
|
|
@@ -195,7 +196,6 @@ export default {
|
|
|
}
|
|
|
let threeArray = null;
|
|
|
if (positions.length % 2 == 0) {
|
|
|
- console.log(positions, positions.length % 3);
|
|
|
threeArray = positions;
|
|
|
|
|
|
|
|
@@ -300,14 +300,14 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
- // const terrainP = new Cesium.CesiumTerrainProvider({
|
|
|
- // url: 'http://192.168.60.2:8090/iserver/services/3D-local3DCache-SanYaShi_GaoCheng_Level_16DataSource/rest/realspace/datas/%E4%B8%89%E4%BA%9A%E5%B8%82_%E9%AB%98%E7%A8%8B_Level_16%40DataSource',
|
|
|
- // isSct: true//地形服务源自SuperMap iServer发布时需设置isSct为true
|
|
|
- // });
|
|
|
+ const terrainP = new Cesium.CesiumTerrainProvider({
|
|
|
+ url: 'http://192.168.60.2:8090/iserver/services/3D-local3DCache-SanYaShi_GaoCheng_Level_16DataSource/rest/realspace/datas/%E4%B8%89%E4%BA%9A%E5%B8%82_%E9%AB%98%E7%A8%8B_Level_16%40DataSource',
|
|
|
+ isSct: true//地形服务源自SuperMap iServer发布时需设置isSct为true
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
|
|
- // viewer.terrainProvider = terrainP;
|
|
|
+ viewer.terrainProvider = terrainP;
|
|
|
|
|
|
|
|
|
|