1e1c3696 by chiangbt

20191209

1 parent e05c7808
<!--
* 矢量数据白模的展示
* 在iDesktop中可以通过矢量面拉升的形式生成建筑物白模
* @Author: jiangbotao
* @Date: 2019-12-07 14:24:01
* @LastEditors: jiangbotao
......
......@@ -61,6 +61,8 @@ export default {
this.smviewer=new Cesium.Viewer('cesiumContainer', {
animation: true
});
$(".cesium-widget-credits")[0].style.visibility="hidden";
$(".cesium-viewer-animationContainer")[0].style.visibility="hidden";
var scenecamera=null;
this.smviewer.imageryLayers.addImageryProvider(new Cesium.BingMapsImageryProvider({
url : 'https://dev.virtualearth.net',
......
......@@ -73,7 +73,14 @@ export default {
imageryLayers.addImageryProvider(labelImagery);
__this.smviewer.camera.setView({
destination : Cesium.Cartesian3.fromDegrees(116.34485552299206, 39.99754814959118, 450.0)
destination : Cesium.Cartesian3.fromDegrees(116.34485552299206, 39.99754814959118, 600.0),
orientation:{
// 指向
heading:Cesium.Math.toRadians(45, 0),
// 视角
pitch:Cesium.Math.toRadians(-45),
roll:0.0
}
});
// 鼠标左键点击事件
var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
......
......@@ -203,30 +203,30 @@ export default {
// b. 使用entity模型
function addClapFeature(feature) {
var lonLatArr = getLonLatArray(feature.geometry.points);
// smviewer.entities.add({
// id: 'identify-area',
// name: '单体化标识面',
// polygon: {
// hierarchy: Cesium.Cartesian3.fromDegreesArray(lonLatArr),
// material: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
// },
// clampToS3M: true // 贴在S3M模型表面
// });
console.log(lonLatArr);
smviewer.entities.add({
id: 'identify-area',
name: '单体化标识面',
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(lonLatArr),
material: new Cesium.Color(0.0, 1.0, 0.0, 0.3),
// perPositionHeight: true,
extrudedHeight: 100,
height: 50,
vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
outline : true,
outlineColor : Cesium.Color.BLACK
material: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
},
clampToS3M: true // 贴在S3M模型表面
});
// console.log(lonLatArr);
// smviewer.entities.add({
// id: 'identify-area',
// name: '单体化标识面',
// polygon: {
// hierarchy: Cesium.Cartesian3.fromDegreesArray(lonLatArr),
// material: new Cesium.Color(0.0, 1.0, 0.0, 0.3),
// // perPositionHeight: true,
// extrudedHeight: 100,
// height: 50,
// vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
// outline : true,
// outlineColor : Cesium.Color.BLACK
// },
// });
}
// 得到[经度,纬度,经度,纬度...]形式的数组,用于构造面。
......