From 3db05e674ff210b7500665c274cc4ca79af8234f Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 30 Jun 2021 14:00:42 +0800
Subject: [PATCH] 左侧细节
---
widgets/modelDiagram/Widget.html | 8 +++
widgets/spatialAnalysis/Widget.js | 12 ++++++
widgets/modelDiagram/Widget.js | 66 ++++++++++++++++++++++++++------
3 files changed, 72 insertions(+), 14 deletions(-)
diff --git a/widgets/modelDiagram/Widget.html b/widgets/modelDiagram/Widget.html
index 66414fc..07c1c6a 100644
--- a/widgets/modelDiagram/Widget.html
+++ b/widgets/modelDiagram/Widget.html
@@ -43,6 +43,11 @@
</tbody>
</table>
</div> -->
+ <div style="position: relative;left:-400px;background-color: aliceblue;display:none">
+ c<input type="nubmer" id="c">
+ w <input type="nubmer" id="w">
+ g<input type="nubmer" id="g">
+ </div>
<div id="modelDiagramCHONGFU" title="建议先点击单次添加">
输入重复多少:
<div>
@@ -82,7 +87,8 @@
<span>高度:</span> <input type="number" class="closemodoinput" id="modelDiagramgdu" value="1000" placeholder="经度">
</div>
<div title="倍数小了就找不到了">
- <span>倍数:</span> <input type="number" class="closemodoinput" id="modelDiagrambeishu" value="1000" placeholder="经度">
+ <span>倍数:</span> <input type="number" class="closemodoinput" id="modelDiagrambeishu" value="1000"
+ placeholder="经度">
</div>
</div>
<div class="seemodo">跟踪</div>
diff --git a/widgets/modelDiagram/Widget.js b/widgets/modelDiagram/Widget.js
index 6281ded..067f034 100644
--- a/widgets/modelDiagram/Widget.js
+++ b/widgets/modelDiagram/Widget.js
@@ -93,42 +93,42 @@
title: '人偶',
value: './images/gltf/Cesium_Man.glb',
id: 100,
- num: [3, 3, 1, 1]
+ num: [3, 3, 1, 1, 12, 1, 6]
}, {
title: '飞机',
value: './images/gltf/Cesium_Air.glb',
id: 101,
- num: [3, 3, 30, 30]
+ num: [3, 3, 30, 30, 27, 3, 6]
}, {
title: '飞机2',
value: './images/gltf/CesiumDrone.glb',
id: 102,
- num: [3, 3, 7, 7]
+ num: [3, 3, 7, 7, 17, 2, 6]
}, {
title: '装甲车',
value: './images/gltf/GroundVehicle.glb',
id: 103,
- num: [3, 3, 4, 9]
+ num: [3, 3, 4, 9, 17, 1, 6]
}, {
title: '热气球',
value: './images/gltf/CesiumBalloon.glb',
id: 104,
- num: [3, 3, 15, 17]
+ num: [3, 3, 15, 17, 33, 2, 6]
}, {
title: '牛奶车',
value: './images/gltf/CesiumMilkTruck.glb',
id: 105,
- num: [3, 3, 3, 5]
+ num: [3, 3, 3, 5, 13, 1, 6]
}, {
title: '牛奶车gltf',
value: './images/gltf/CesiumMilkTruck.gltf',
id: 106,
- num: [3, 3, 3, 5]
+ num: [3, 3, 3, 5, 13, 1, 6]
}, {
title: '人gltf',
value: './images/gltf/walk.gltf',
id: 107,
- num: [3, 3, 1, 1]
+ num: [3, 3, 1, 1, 11, 1, 4]
}],
click: function (obj) {
layer.tips('选择了:' + obj.title, this.elem, {
@@ -144,11 +144,29 @@
that.getInput();
var neWnum = [obj.num[0], obj.num[1], obj.num[2] * that.scale, obj.num[3] * that.scale]
that.setNum(neWnum);
+ that.shijiaoC = obj.num[4];
+ that.shijiaoW = obj.num[5];
+ that.shijiaoG = obj.num[6];
}
});
});
var a = 1;
var b = 1;
+ $("#c").bind('input propertychange', function () {
+ var a = $("#c").val();
+ that.shijiaoC = a;
+ console.log(that.shijiaoC)
+ })
+ $("#w").bind('input propertychange', function () {
+ var a = $("#w").val();
+ that.shijiaoW = a;
+ console.log(that.shijiaoW)
+ })
+ $("#g").bind('input propertychange', function () {
+ var a = $("#g").val();
+ that.shijiaoG = a;
+ console.log(that.shijiaoG)
+ })
$("#modelDiagrambeishu").on("input", function () {
// $('#modelDiagramW').val();
var it = $(this).val();
@@ -190,11 +208,29 @@
if (once == 'once') {
// viewer.trackedEntity = that.entityPeople;
- var gg = g + scale * 6;
- that.map.camera.flyTo({
- destination: Cesium.Cartesian3.fromDegrees(a, b, gg),
- duration: 3
- });
+
+ var gg = g + scale * that.shijiaoG;
+ if (scale > 10000) {
+ var aa = a;
+ var bb = b;
+ that.map.camera.flyTo({
+ destination: Cesium.Cartesian3.fromDegrees(a, b, gg),
+ duration: 3
+ });
+ } else {
+ var aa = a + (scale * that.shijiaoC) / 100000;
+ var bb = b + (scale * that.shijiaoW) / 100000;
+ that.map.scene.camera.setView({
+ destination: new Cesium.Cartesian3.fromDegrees(Number(aa), Number(bb), Number(gg)),
+ orientation: {
+ heading: Cesium.Math.toRadians(Number(265.00)),
+ pitch: Cesium.Math.toRadians(Number(-15.98)),
+ roll: Cesium.Math.toRadians(Number(360.00))
+ }
+ });
+ }
+
+
}
@@ -225,6 +261,10 @@
b: '',
g: '',
scale: '',
+ shijiaoC: 12,
+ shijiaoW: 1,
+ shijiaoG: 4,
+
//重复添加
always: function (aa = 'a', bb = 'b') {
this.getInput();
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
index 564477b..c8e0e3d 100644
--- a/widgets/spatialAnalysis/Widget.js
+++ b/widgets/spatialAnalysis/Widget.js
@@ -402,6 +402,18 @@
roll: Cesium.Math.toRadians(Number(ourdata.rollAngle))
}
});
+ // console.log(ourdata.lon)
+ // console.log(ourdata.lat)
+ // console.log(ourdata.height)
+ // console.log(ourdata.yawAngle)
+ // console.log(ourdata.pitchAngle)
+ // console.log(ourdata.rollAngle)
+ //115.996858
+ //29.170348
+ //232.99
+ //84.10
+ //-22.98
+ //360.00
}
if (ourdata.src.indexOf('.openrealspace') != -1) {
// console.log('数据正确');
--
Gitblit v1.9.3