eba2a574 by jikai

111111

1 parent f82c53a4
......@@ -31,26 +31,6 @@
@visualField='EvisualField'
@yyAnslysis='EyyAnslysis'
@kgAnalusis='EkgAnalusis'
<div class="rightFunc">
<rightFunc @isReturn='EisReturn'
@enlarge='Eenlarge'
@narrow='narrow'
@coordinate='Ecoordinate'
@distance='Edistance'
@area='Earea'
@marker='Emarker'
@rollerShutter='ErollerShutter'
@splitScreen='EsplitScreen'
@toNorth='EtoNorth'
@topSee='EtopSee'
@roundSee='EroundSee'
@horizon='Ehorizon'
@allSee='EallSee'
@ymAnslysis='EymAnslysis'
@tjxAnslysis='EtjxAnslysis'
@yyAnslysis='EyyAnslysis'
@kgAnalusis='EkgAnalusis'
:enlarge='enlarge'
:narrow='narrow'
......@@ -70,23 +50,7 @@
:visualField='visualField'
:yyAnslysis='yyAnslysis'
:kgAnalusis='kgAnalusis'></rightFunc>
:enlarge='enlarge'
:narrow='narrow'
:coordinate='coordinate'
:distance='distance'
:area='area'
:marker='marker'
:rollerShutter='rollerShutter'
:splitScreen='splitScreen'
:toNorth='toNorth'
:topSee='topSee'
:roundSee='roundSee'
:horizon='horizon'
:allSee='allSee'
:ymAnslysis='ymAnslysis'
:tjxAnslysis='tjxAnslysis'
:yyAnslysis='yyAnslysis'
:kgAnalusis='kgAnalusis'></rightFunc>
</div>
<div class="bottomNav">
<bottomNav></bottomNav>
......@@ -343,93 +307,7 @@
,EtopSee() {}
// 环视
,EroundSee() {
// var parentEntity = this.viewer.entities.add(new Cesium.Entity()), positions = [], cartesian, polyline;
// this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
// this.handler.setInputAction(evt => {
// cartesian = this.viewer.scene.pickPosition(evt.position);
// // cartesian = this.draw.getCatesian3FromPX(evt.position, this.viewer, []);
// positions.push(cartesian.clone());
// // addCompany.createPoint.call(this, {position: cartesian})
// if(positions.length === 1) {
// this.handler.setInputAction(moveEvent => {
// positions[1] = this.viewer.scene.pickPosition(moveEvent.endPosition);
// // positions[1] = this.draw.getCatesian3FromPX(moveEvent.endPosition, this.viewer, []);
// !polyline && (polyline = addCompany.createPolyline.call(this, positions));
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
// return;
// }
// this.handler.destroy();
// // console.log(Cesium.Cartesian3.distance(positions[0], positions[1]));
// // var cartesian = this.draw.getCatesian3FromPX(evt.position, this.viewer, []);
// var viewPointEntity = this.viewer.entities.add({
// parent: parentEntity,
// position: positions[0],
// ellipsoid: {
// radii: new Cesium.Cartesian3(5, 5, 5),
// material: Cesium.Color.GREEN
// }
// });
// // // 世界坐标转换为投影坐标
// var webMercatorProjection = new Cesium.WebMercatorProjection(this.viewer.scene.globe.ellipsoid);
// var viewPointWebMercator = webMercatorProjection.project(Cesium.Cartographic.fromCartesian(positions[0]));
// // // 排除碰撞监测的对象
// var objectsToExclude = [viewPointEntity];
// // 目标点集合
// var destPoints = [];
// // 视域点和目标点的距离
// var radius = Cesium.Cartesian3.distance(positions[0], positions[1]); // 视距1000米
// // 计算一圈
// for (var i = 0; i <= 30; i++) {
// // 度数转弧度
// var radians = Cesium.Math.toRadians(i);
// // 计算目标点
// var toPoint = new Cesium.Cartesian3(viewPointWebMercator.x + radius * Math.cos(radians), viewPointWebMercator.y + radius * Math.sin(radians), 10);
// // 投影坐标转世界坐标
// toPoint = webMercatorProjection.unproject(toPoint);
// destPoints.push(Cesium.Cartographic.toCartesian(toPoint.clone()));
// }
// let viewer = this.viewer;
// // 绘制线
// function drawLine(leftPoint, secPoint, color) {
// viewer.entities.add({
// polyline: {
// positions: [leftPoint, secPoint],
// arcType: Cesium.ArcType.NONE,
// width: 5,
// material: color,
// depthFailMaterial: color
// }
// })
// }
// pickFromRay.call(this);
// function pickFromRay() {
// for (var i = 0; i < destPoints.length; i++) {
// // 计算射线的方向,目标点left 视域点right
// var direction = Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(destPoints[i], positions[0], new Cesium.Cartesian3()), new Cesium.Cartesian3());
// console.log(direction);
// // 建立射线
// var ray = new Cesium.Ray(positions[0], direction);
// var result = viewer.scene.pickFromRay(ray, objectsToExclude); // 计算交互点,返回第一个
// showIntersection(result, destPoints[i], positions[0]);
// }
// }
// // 处理交互点
// function showIntersection(result, destPoint, cartesian) {
// // 如果是场景模型的交互点,排除交互点是地球表面
// if (Cesium.defined(result) && Cesium.defined(result.object)) {
// drawLine(result.position, cartesian, Cesium.Color.GREEN); // 可视区域
// drawLine(result.position, destPoint, Cesium.Color.RED); // 不可视区域
// } else {
// drawLine(cartesian, destPoint, Cesium.Color.GREEN);
// }
// }
// this.handler.destroy();
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
}
// 视域
,Ehorizon(val) {
......