5 files modified
1 files added
| | |
| | | $('.jimu-widget-Sign').hide(); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | |
| | | $('.tool-y-box').hide(); |
| | | } |
| | | }, |
| | | closefenxi: function () { |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //清除实体 |
| | | this.map.entities.removeAll(); |
| | | $(".jimu-widget-modelDiagram").hide(); |
| | | |
| | | }, |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | | }, |
| | |
| | | <div> |
| | | <div title="先点击单次添加 否则找不到实体"> |
| | | <!-- <div id="modelDiagramToolbar" class="param-container tool-bar"> |
| | | <div style="width:215px;"> |
| | | <select id="modelDiagramSelOpt" class="selectpicker show-tick form-control"> |
| | |
| | | </table> |
| | | </div> --> |
| | | <div class="modelDiagramMain"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramjdu" value="116" placeholder="经度"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramwdu" value="29" placeholder="纬度"> |
| | | <div class="inp"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramjdu" value="116.00001" placeholder="经度"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramwdu" value="29.00001" placeholder="纬度"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramgdu" value="1000" placeholder="高度"> |
| | | </div> |
| | | <div class="seemodo">跟踪</div> |
| | | <div class="closemodo">添加/删除</div> |
| | | <div class="beginPlay">自动行走</div> |
| | | <div class="stopPlay">stop</div> |
| | | <div class="but"> |
| | | <div class="once buts">单次添加</div> |
| | | <div class="always buts" title="右键有惊喜">重复添加</div> |
| | | <div class="stopPlay buts">全部删除</div> |
| | | </div> |
| | | </div> |
| | | <i class="layui-icon closesmodelDiagram"> |
| | | ဆ |
| | |
| | | // that.beginModelDiagram(); |
| | | // that.beginCesium(); |
| | | |
| | | $('.seemodo').click(() => { |
| | | that.seemodo(); |
| | | // 三个按钮事件 |
| | | $('.jimu-widget-modelDiagram').find('.once').click(() => { |
| | | that.once(); |
| | | }) |
| | | |
| | | $('.closemodo').click(() => { |
| | | that.closeModo(); |
| | | $('.jimu-widget-modelDiagram').find('.always').click(() => { |
| | | that.always(); |
| | | }) |
| | | $('.beginPlay').click(() => { |
| | | that.beginPlay(); |
| | | }) |
| | | $('.stopPlay').click(() => { |
| | | $('.jimu-widget-modelDiagram').find('.stopPlay').click(() => { |
| | | that.stopPlay(); |
| | | }) |
| | | $('.closesmodelDiagram').click(() => { |
| | | console.log(3423) |
| | | $('.jimu-widget-modelDiagram').hide(); |
| | | if (that.openEntity) { |
| | | that.map.entities.removeAll(); |
| | | |
| | | $('.jimu-widget-modelDiagram').find('.always').unbind("mousedown").bind("mousedown", function (event) { |
| | | if (event.which == 3) { |
| | | // console.log('you'); |
| | | that.getInput(); |
| | | var as = that.a - 0.00004 |
| | | , bs = that.b - 0.00004; |
| | | for (var i = 1; i <= 7; i++) { |
| | | var aa = as * 100000; |
| | | aa += i; |
| | | aa = aa / 100000; |
| | | for (var n = 1; n <= 6; n++) { |
| | | var bb = bs * 100000; |
| | | bb += n; |
| | | bb = bb / 100000; |
| | | // console.log(aa,bb) |
| | | that.always(aa, bb); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } else if (event.which == 1) { |
| | | // console.log('zuo'); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | beginCesium: function (a = 116.058987, b = 28.973468, g = 1000) { |
| | | beginCesium: function (a = 116.058987, b = 28.973468, g = 1000, once = 'always') { |
| | | var viewer = this.map |
| | | , that = this |
| | | , url = "./images/gltf/Cesium_Man.glb"; |
| | | // var startPosition = new Cesium.Cartesian3( |
| | | // 116.058987, |
| | | // 28.973468, |
| | | // 1000 |
| | | // ); |
| | | // var endPosition = new Cesium.Cartesian3( |
| | | // 116.158987, |
| | | // 29.073468, |
| | | // 1000 |
| | | // ); |
| | | // var position = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468); |
| | | //动态 //缺少viewer.timeline时间轴 |
| | | //Make sure viewer is at the desired time. |
| | | //Make sure viewer is at the desired time. |
| | | // var start = Cesium.JulianDate.fromDate(new Date(2018, 11, 12, 15)); |
| | | // var totalSeconds = 10; |
| | | // var stop = Cesium.JulianDate.addSeconds( |
| | | // start, |
| | | // totalSeconds, |
| | | // new Cesium.JulianDate() |
| | | // ); |
| | | // viewer.clock.startTime = start.clone(); |
| | | // viewer.clock.stopTime = stop.clone(); |
| | | // viewer.clock.currentTime = start.clone(); |
| | | // viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP; |
| | | // // console.log(viewer.timeline,111) |
| | | // viewer.timeline.zoomTo = function (startTime, stopTime) { |
| | | // //>>includeStart('debug', pragmas.debug); |
| | | // if (!defined(startTime)) { |
| | | // throw new DeveloperError("startTime is required."); |
| | | // } |
| | | // if (!defined(stopTime)) { |
| | | // throw new DeveloperError("stopTime is required"); |
| | | // } |
| | | // if (JulianDate.lessThanOrEquals(stopTime, startTime)) { |
| | | // throw new DeveloperError("Start time must come before end time."); |
| | | // } |
| | | // //>>includeEnd('debug'); |
| | | |
| | | // this._startJulian = startTime; |
| | | // this._endJulian = stopTime; |
| | | // this._timeBarSecondsSpan = JulianDate.secondsDifference(stopTime, startTime); |
| | | |
| | | // // If clock is not unbounded, clamp timeline range to clock. |
| | | // if (this._clock && this._clock.clockRange !== ClockRange$1.UNBOUNDED) { |
| | | // var clockStart = this._clock.startTime; |
| | | // var clockEnd = this._clock.stopTime; |
| | | // var clockSpan = JulianDate.secondsDifference(clockEnd, clockStart); |
| | | // var startOffset = JulianDate.secondsDifference( |
| | | // clockStart, |
| | | // this._startJulian |
| | | // ); |
| | | // var endOffset = JulianDate.secondsDifference(clockEnd, this._endJulian); |
| | | |
| | | // if (this._timeBarSecondsSpan >= clockSpan) { |
| | | // // if new duration longer than clock range duration, clamp to full range. |
| | | // this._timeBarSecondsSpan = clockSpan; |
| | | // this._startJulian = this._clock.startTime; |
| | | // this._endJulian = this._clock.stopTime; |
| | | // } else if (startOffset > 0) { |
| | | // // if timeline start is before clock start, shift right |
| | | // this._endJulian = JulianDate.addSeconds( |
| | | // this._endJulian, |
| | | // startOffset, |
| | | // new JulianDate() |
| | | // ); |
| | | // this._startJulian = clockStart; |
| | | // this._timeBarSecondsSpan = JulianDate.secondsDifference( |
| | | // this._endJulian, |
| | | // this._startJulian |
| | | // ); |
| | | // } else if (endOffset < 0) { |
| | | // // if timeline end is after clock end, shift left |
| | | // this._startJulian = JulianDate.addSeconds( |
| | | // this._startJulian, |
| | | // endOffset, |
| | | // new JulianDate() |
| | | // ); |
| | | // this._endJulian = clockEnd; |
| | | // this._timeBarSecondsSpan = JulianDate.secondsDifference( |
| | | // this._endJulian, |
| | | // this._startJulian |
| | | // ); |
| | | // } |
| | | // } |
| | | |
| | | // this._makeTics(); |
| | | |
| | | // var evt = document.createEvent("Event"); |
| | | // evt.initEvent("setzoom", true, true); |
| | | // evt.startJulian = this._startJulian; |
| | | // evt.endJulian = this._endJulian; |
| | | // evt.epochJulian = this._epochJulian; |
| | | // evt.totalSpan = this._timeBarSecondsSpan; |
| | | // evt.mainTicSpan = this._mainTicSpan; |
| | | // this._topDiv.dispatchEvent(evt); |
| | | // } |
| | | // viewer.timeline.zoomTo(start, stop); |
| | | |
| | | // // Create a path for our vehicle by lerping between two positions. |
| | | // var position = new Cesium.SampledPositionProperty(); |
| | | // var startPosition = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468, 1000); |
| | | // var endPosition = Cesium.Cartesian3.fromDegrees(116.158987, 29.073468, 1000); |
| | | // // var startPosition = new Cesium.Cartesian3( |
| | | // // -2379556.799372864, |
| | | // // -4665528.205030263, |
| | | // // 3628013.106599678 |
| | | // // ); |
| | | // // var endPosition = new Cesium.Cartesian3( |
| | | // // -2379603.7074103747, |
| | | // // -4665623.48990283, |
| | | // // 3627860.82704567 |
| | | // // ); |
| | | // // A velocity vector property will give us the entity's speed and direction at any given time. |
| | | // var velocityVectorProperty = new Cesium.VelocityVectorProperty( |
| | | // position, |
| | | // false |
| | | // ); |
| | | // var velocityVector = new Cesium.Cartesian3(); |
| | | // // Store the wheel's rotation over time in a SampledProperty. |
| | | // var wheelAngleProperty = new Cesium.SampledProperty(Number); |
| | | // var wheelAngle = 0; |
| | | |
| | | // var numberOfSamples = 100; |
| | | // for (var i = 0; i <= numberOfSamples; ++i) { |
| | | // var factor = i / numberOfSamples; |
| | | // var time = Cesium.JulianDate.addSeconds( |
| | | // start, |
| | | // factor * totalSeconds, |
| | | // new Cesium.JulianDate() |
| | | // ); |
| | | |
| | | // // Lerp using a non-linear factor so that the vehicle accelerates. |
| | | // var locationFactor = Math.pow(factor, 2); |
| | | // var location = Cesium.Cartesian3.lerp( |
| | | // startPosition, |
| | | // endPosition, |
| | | // locationFactor, |
| | | // new Cesium.Cartesian3() |
| | | // ); |
| | | // position.addSample(time, location); |
| | | // // Rotate the wheels based on how fast the vehicle is moving at each timestep. |
| | | // velocityVectorProperty.getValue(time, velocityVector); |
| | | // var metersPerSecond = Cesium.Cartesian3.magnitude(velocityVector); |
| | | // var wheelRadius = 0.52; //in meters. |
| | | // var circumference = Math.PI * wheelRadius * 2; |
| | | // var rotationsPerSecond = metersPerSecond / circumference; |
| | | |
| | | // wheelAngle += |
| | | // ((Math.PI * 2 * totalSeconds) / numberOfSamples) * |
| | | // rotationsPerSecond; |
| | | // wheelAngleProperty.addSample(time, wheelAngle); |
| | | // } |
| | | |
| | | // function updateSpeedLabel(time, result) { |
| | | // velocityVectorProperty.getValue(time, velocityVector); |
| | | // var metersPerSecond = Cesium.Cartesian3.magnitude(velocityVector); |
| | | // var kmPerHour = Math.round(metersPerSecond * 3.6); |
| | | |
| | | // return kmPerHour + " km/hr"; |
| | | // } |
| | | |
| | | // var rotationProperty = new Cesium.CallbackProperty(function ( |
| | | // time, |
| | | // result |
| | | // ) { |
| | | // return Cesium.Quaternion.fromAxisAngle( |
| | | // Cesium.Cartesian3.UNIT_X, |
| | | // wheelAngleProperty.getValue(time), |
| | | // result |
| | | // ); |
| | | // }, |
| | | // false); |
| | | |
| | | // var wheelTransformation = new Cesium.NodeTransformationProperty({ |
| | | // rotation: rotationProperty, |
| | | // }); |
| | | |
| | | // var nodeTransformations = { |
| | | // Wheels: wheelTransformation, |
| | | // Wheels_mid: wheelTransformation, |
| | | // Wheels_rear: wheelTransformation, |
| | | // }; |
| | | |
| | | // // Add our vehicle model. |
| | | // var vehicleEntity = viewer.entities.add({ |
| | | // position: position, |
| | | // orientation: new Cesium.VelocityOrientationProperty(position), // Automatically set the vehicle's orientation to the direction it's facing. |
| | | // model: { |
| | | // uri: url, |
| | | // runAnimations: false, |
| | | // nodeTransformations: nodeTransformations, |
| | | // }, |
| | | // label: { |
| | | // text: new Cesium.CallbackProperty(updateSpeedLabel, false), |
| | | // font: "20px sans-serif", |
| | | // showBackground: true, |
| | | // distanceDisplayCondition: new Cesium.DistanceDisplayCondition( |
| | | // 0.0, |
| | | // 100.0 |
| | | // ), |
| | | // eyeOffset: new Cesium.Cartesian3(0, 3.5, 0), |
| | | // }, |
| | | // }); |
| | | |
| | | // viewer.trackedEntity = vehicleEntity; |
| | | // vehicleEntity.viewFrom = new Cesium.Cartesian3(-10.0, 7.0, 4.0); |
| | | |
| | | //静态 |
| | | // var position = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468, 1000); |
| | | var position = Cesium.Cartesian3.fromDegrees(a, b, g); |
| | | viewer.trackedEntity = viewer.entities.add({//viewer.trackedEntity跟随 |
| | | that.entityPeople = viewer.entities.add({//viewer.trackedEntity跟随 |
| | | name: url, |
| | | position: position, |
| | | model: { |
| | | uri: url, |
| | | }, |
| | | }); |
| | | that.entityPeople = viewer.trackedEntity; |
| | | if (once == 'once') { |
| | | viewer.trackedEntity = that.entityPeople; |
| | | } |
| | | |
| | | // var viewModel = {// 以下是工具栏 |
| | | // blackAndWhiteShow: false, |
| | | // blackAndWhiteGradations: 5.0, |
| | | // brightnessShow: false, |
| | | // brightnessValue: 0.5, |
| | | // nightVisionShow: false, |
| | | // silhouette: false, |
| | | // }; |
| | | |
| | | // Cesium.knockout.track(viewModel); |
| | | // var toolbar = document.getElementById("toolbarcesium"); |
| | | // Cesium.knockout.applyBindings(viewModel, toolbar); |
| | | // for (var name in viewModel) { |
| | | // if (viewModel.hasOwnProperty(name)) { |
| | | // Cesium.knockout |
| | | // .getObservable(viewModel, name) |
| | | // .subscribe(updatePostProcess); |
| | | // } |
| | | // } |
| | | |
| | | // if ( |
| | | // !Cesium.PostProcessStageLibrary.isSilhouetteSupported(viewer.scene) |
| | | // ) { |
| | | // window.alert( |
| | | // "This browser does not support the silhouette post process." |
| | | // ); |
| | | // } |
| | | |
| | | // var stages = viewer.scene.postProcessStages; |
| | | // var silhouette = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createSilhouetteStage() |
| | | // ); |
| | | // var blackAndWhite = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createBlackAndWhiteStage() |
| | | // ); |
| | | // var brightness = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createBrightnessStage() |
| | | // ); |
| | | // var nightVision = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createNightVisionStage() |
| | | // ); |
| | | |
| | | // function updatePostProcess() { |
| | | // silhouette.enabled = Boolean(viewModel.silhouette); |
| | | // silhouette.uniforms.color = Cesium.Color.YELLOW; |
| | | // blackAndWhite.enabled = Boolean(viewModel.blackAndWhiteShow); |
| | | // blackAndWhite.uniforms.gradations = Number( |
| | | // viewModel.blackAndWhiteGradations |
| | | // ); |
| | | // brightness.enabled = Boolean(viewModel.brightnessShow); |
| | | // brightness.uniforms.brightness = Number(viewModel.brightnessValue); |
| | | // nightVision.enabled = Boolean(viewModel.nightVisionShow); |
| | | // } |
| | | // updatePostProcess(); |
| | | |
| | | }, |
| | | entityPeople: '', |
| | |
| | | }, |
| | | stopPlay: function () { |
| | | this.map.entities.removeAll(); |
| | | clearInterval(this.time); |
| | | // clearInterval(this.time); |
| | | }, |
| | | seemodo: function () { |
| | | var that = this; |
| | |
| | | // console.log('seedom') |
| | | // this.map.entities.remove(this.entityPeople)//删除entity |
| | | }, |
| | | getInput: function () { |
| | | this.a = $('#modelDiagramjdu').val() == '' ? 116.058987 : +$('#modelDiagramjdu').val(); |
| | | this.b = $('#modelDiagramwdu').val() == '' ? 28.973468 : +$('#modelDiagramwdu').val(); |
| | | this.g = $('#modelDiagramgdu').val() == '' ? 1000 : +$('#modelDiagramgdu').val(); |
| | | }, |
| | | a: '', |
| | | b: '', |
| | | g: '', |
| | | //重复添加 |
| | | always: function (aa = 'a', bb = 'b') { |
| | | this.getInput(); |
| | | // console.log([a, b, g]) |
| | | if (aa != 'a' && bb != 'b') { |
| | | this.beginCesium(aa, bb, this.g); |
| | | } else { |
| | | this.beginCesium(this.a, this.b, this.g); |
| | | } |
| | | }, |
| | | //单次添加 |
| | | once: function () { |
| | | this.stopPlay(); |
| | | this.getInput(); |
| | | // console.log([a, b, g]) |
| | | this.beginCesium(this.a, this.b, this.g, 'once'); |
| | | }, |
| | | closeModo: function () { |
| | | if (this.openEntity) { |
| | | // this.map.entities.remove(this.entityPeople)//删除entity |
| | | // this.map.entities.remove(this.map.trackedEntity)//删除entity |
| | | this.map.entities.removeAll(); |
| | | } else { |
| | | var a = $('#modelDiagramjdu').val() == '' ? 116.058987 : +$('#modelDiagramjdu').val(); |
| | | var b = $('#modelDiagramwdu').val() == '' ? 28.973468 : +$('#modelDiagramwdu').val(); |
| | | var g = $('#modelDiagramgdu').val() == '' ? 1000 : +$('#modelDiagramgdu').val(); |
| | | this.getInput |
| | | // console.log([a, b, g]) |
| | | this.beginCesium(a, b, g); |
| | | } |
| New file |
| | |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | // Copyright © 2019 zhongsong. All Rights Reserved. |
| | | // 模块描述:显示坐标 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | define([ |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | 'jimu/utils', |
| | | 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css', |
| | | 'libs/zTree_v3/js/jquery.ztree.all' |
| | | ], |
| | | function (declare, |
| | | lang, |
| | | array, |
| | | html, |
| | | topic, |
| | | BaseWidget, |
| | | aspect, |
| | | string, |
| | | utils |
| | | ) { |
| | | return declare([BaseWidget], { |
| | | baseClass: 'jimu-widget-modelDiagram', |
| | | name: 'modelDiagram', |
| | | layers: {}, |
| | | startup: function () { |
| | | var that = this; |
| | | // 暴露在外的接口 |
| | | // that.beginModelDiagram(); |
| | | // that.beginCesium(); |
| | | |
| | | // $('.seemodo').click(() => { |
| | | // that.seemodo(); |
| | | // }) |
| | | |
| | | // $('.closemodo').click(() => { |
| | | // that.closeModo(); |
| | | // }) |
| | | // $('.beginPlay').click(() => { |
| | | // that.beginPlay(); |
| | | // }) |
| | | // $('.stopPlay').click(() => { |
| | | // that.stopPlay(); |
| | | // }) |
| | | // $('.closesmodelDiagram').click(() => { |
| | | // console.log(3423) |
| | | // $('.jimu-widget-modelDiagram').hide(); |
| | | // if (that.openEntity) { |
| | | // that.map.entities.removeAll(); |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | // 三个按钮事件 |
| | | $('.jimu-widget-modelDiagram').find('.once').click(() => { |
| | | that.once(); |
| | | }) |
| | | $('.jimu-widget-modelDiagram').find('.always').click(() => { |
| | | that.always(); |
| | | }) |
| | | $('.jimu-widget-modelDiagram').find('.stopPlay').click(() => { |
| | | that.stopPlay(); |
| | | }) |
| | | |
| | | }, |
| | | beginCesium: function (a = 116.058987, b = 28.973468, g = 1000, once = 'always') { |
| | | var viewer = this.map |
| | | , that = this |
| | | , url = "./images/gltf/Cesium_Man.glb"; |
| | | // var startPosition = new Cesium.Cartesian3( |
| | | // 116.058987, |
| | | // 28.973468, |
| | | // 1000 |
| | | // ); |
| | | // var endPosition = new Cesium.Cartesian3( |
| | | // 116.158987, |
| | | // 29.073468, |
| | | // 1000 |
| | | // ); |
| | | // var position = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468); |
| | | //动态 //缺少viewer.timeline时间轴 |
| | | //Make sure viewer is at the desired time. |
| | | //Make sure viewer is at the desired time. |
| | | // var start = Cesium.JulianDate.fromDate(new Date(2018, 11, 12, 15)); |
| | | // var totalSeconds = 10; |
| | | // var stop = Cesium.JulianDate.addSeconds( |
| | | // start, |
| | | // totalSeconds, |
| | | // new Cesium.JulianDate() |
| | | // ); |
| | | // viewer.clock.startTime = start.clone(); |
| | | // viewer.clock.stopTime = stop.clone(); |
| | | // viewer.clock.currentTime = start.clone(); |
| | | // viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP; |
| | | // // console.log(viewer.timeline,111) |
| | | // viewer.timeline.zoomTo = function (startTime, stopTime) { |
| | | // //>>includeStart('debug', pragmas.debug); |
| | | // if (!defined(startTime)) { |
| | | // throw new DeveloperError("startTime is required."); |
| | | // } |
| | | // if (!defined(stopTime)) { |
| | | // throw new DeveloperError("stopTime is required"); |
| | | // } |
| | | // if (JulianDate.lessThanOrEquals(stopTime, startTime)) { |
| | | // throw new DeveloperError("Start time must come before end time."); |
| | | // } |
| | | // //>>includeEnd('debug'); |
| | | |
| | | // this._startJulian = startTime; |
| | | // this._endJulian = stopTime; |
| | | // this._timeBarSecondsSpan = JulianDate.secondsDifference(stopTime, startTime); |
| | | |
| | | // // If clock is not unbounded, clamp timeline range to clock. |
| | | // if (this._clock && this._clock.clockRange !== ClockRange$1.UNBOUNDED) { |
| | | // var clockStart = this._clock.startTime; |
| | | // var clockEnd = this._clock.stopTime; |
| | | // var clockSpan = JulianDate.secondsDifference(clockEnd, clockStart); |
| | | // var startOffset = JulianDate.secondsDifference( |
| | | // clockStart, |
| | | // this._startJulian |
| | | // ); |
| | | // var endOffset = JulianDate.secondsDifference(clockEnd, this._endJulian); |
| | | |
| | | // if (this._timeBarSecondsSpan >= clockSpan) { |
| | | // // if new duration longer than clock range duration, clamp to full range. |
| | | // this._timeBarSecondsSpan = clockSpan; |
| | | // this._startJulian = this._clock.startTime; |
| | | // this._endJulian = this._clock.stopTime; |
| | | // } else if (startOffset > 0) { |
| | | // // if timeline start is before clock start, shift right |
| | | // this._endJulian = JulianDate.addSeconds( |
| | | // this._endJulian, |
| | | // startOffset, |
| | | // new JulianDate() |
| | | // ); |
| | | // this._startJulian = clockStart; |
| | | // this._timeBarSecondsSpan = JulianDate.secondsDifference( |
| | | // this._endJulian, |
| | | // this._startJulian |
| | | // ); |
| | | // } else if (endOffset < 0) { |
| | | // // if timeline end is after clock end, shift left |
| | | // this._startJulian = JulianDate.addSeconds( |
| | | // this._startJulian, |
| | | // endOffset, |
| | | // new JulianDate() |
| | | // ); |
| | | // this._endJulian = clockEnd; |
| | | // this._timeBarSecondsSpan = JulianDate.secondsDifference( |
| | | // this._endJulian, |
| | | // this._startJulian |
| | | // ); |
| | | // } |
| | | // } |
| | | |
| | | // this._makeTics(); |
| | | |
| | | // var evt = document.createEvent("Event"); |
| | | // evt.initEvent("setzoom", true, true); |
| | | // evt.startJulian = this._startJulian; |
| | | // evt.endJulian = this._endJulian; |
| | | // evt.epochJulian = this._epochJulian; |
| | | // evt.totalSpan = this._timeBarSecondsSpan; |
| | | // evt.mainTicSpan = this._mainTicSpan; |
| | | // this._topDiv.dispatchEvent(evt); |
| | | // } |
| | | // viewer.timeline.zoomTo(start, stop); |
| | | |
| | | // // Create a path for our vehicle by lerping between two positions. |
| | | // var position = new Cesium.SampledPositionProperty(); |
| | | // var startPosition = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468, 1000); |
| | | // var endPosition = Cesium.Cartesian3.fromDegrees(116.158987, 29.073468, 1000); |
| | | // // var startPosition = new Cesium.Cartesian3( |
| | | // // -2379556.799372864, |
| | | // // -4665528.205030263, |
| | | // // 3628013.106599678 |
| | | // // ); |
| | | // // var endPosition = new Cesium.Cartesian3( |
| | | // // -2379603.7074103747, |
| | | // // -4665623.48990283, |
| | | // // 3627860.82704567 |
| | | // // ); |
| | | // // A velocity vector property will give us the entity's speed and direction at any given time. |
| | | // var velocityVectorProperty = new Cesium.VelocityVectorProperty( |
| | | // position, |
| | | // false |
| | | // ); |
| | | // var velocityVector = new Cesium.Cartesian3(); |
| | | // // Store the wheel's rotation over time in a SampledProperty. |
| | | // var wheelAngleProperty = new Cesium.SampledProperty(Number); |
| | | // var wheelAngle = 0; |
| | | |
| | | // var numberOfSamples = 100; |
| | | // for (var i = 0; i <= numberOfSamples; ++i) { |
| | | // var factor = i / numberOfSamples; |
| | | // var time = Cesium.JulianDate.addSeconds( |
| | | // start, |
| | | // factor * totalSeconds, |
| | | // new Cesium.JulianDate() |
| | | // ); |
| | | |
| | | // // Lerp using a non-linear factor so that the vehicle accelerates. |
| | | // var locationFactor = Math.pow(factor, 2); |
| | | // var location = Cesium.Cartesian3.lerp( |
| | | // startPosition, |
| | | // endPosition, |
| | | // locationFactor, |
| | | // new Cesium.Cartesian3() |
| | | // ); |
| | | // position.addSample(time, location); |
| | | // // Rotate the wheels based on how fast the vehicle is moving at each timestep. |
| | | // velocityVectorProperty.getValue(time, velocityVector); |
| | | // var metersPerSecond = Cesium.Cartesian3.magnitude(velocityVector); |
| | | // var wheelRadius = 0.52; //in meters. |
| | | // var circumference = Math.PI * wheelRadius * 2; |
| | | // var rotationsPerSecond = metersPerSecond / circumference; |
| | | |
| | | // wheelAngle += |
| | | // ((Math.PI * 2 * totalSeconds) / numberOfSamples) * |
| | | // rotationsPerSecond; |
| | | // wheelAngleProperty.addSample(time, wheelAngle); |
| | | // } |
| | | |
| | | // function updateSpeedLabel(time, result) { |
| | | // velocityVectorProperty.getValue(time, velocityVector); |
| | | // var metersPerSecond = Cesium.Cartesian3.magnitude(velocityVector); |
| | | // var kmPerHour = Math.round(metersPerSecond * 3.6); |
| | | |
| | | // return kmPerHour + " km/hr"; |
| | | // } |
| | | |
| | | // var rotationProperty = new Cesium.CallbackProperty(function ( |
| | | // time, |
| | | // result |
| | | // ) { |
| | | // return Cesium.Quaternion.fromAxisAngle( |
| | | // Cesium.Cartesian3.UNIT_X, |
| | | // wheelAngleProperty.getValue(time), |
| | | // result |
| | | // ); |
| | | // }, |
| | | // false); |
| | | |
| | | // var wheelTransformation = new Cesium.NodeTransformationProperty({ |
| | | // rotation: rotationProperty, |
| | | // }); |
| | | |
| | | // var nodeTransformations = { |
| | | // Wheels: wheelTransformation, |
| | | // Wheels_mid: wheelTransformation, |
| | | // Wheels_rear: wheelTransformation, |
| | | // }; |
| | | |
| | | // // Add our vehicle model. |
| | | // var vehicleEntity = viewer.entities.add({ |
| | | // position: position, |
| | | // orientation: new Cesium.VelocityOrientationProperty(position), // Automatically set the vehicle's orientation to the direction it's facing. |
| | | // model: { |
| | | // uri: url, |
| | | // runAnimations: false, |
| | | // nodeTransformations: nodeTransformations, |
| | | // }, |
| | | // label: { |
| | | // text: new Cesium.CallbackProperty(updateSpeedLabel, false), |
| | | // font: "20px sans-serif", |
| | | // showBackground: true, |
| | | // distanceDisplayCondition: new Cesium.DistanceDisplayCondition( |
| | | // 0.0, |
| | | // 100.0 |
| | | // ), |
| | | // eyeOffset: new Cesium.Cartesian3(0, 3.5, 0), |
| | | // }, |
| | | // }); |
| | | |
| | | // viewer.trackedEntity = vehicleEntity; |
| | | // vehicleEntity.viewFrom = new Cesium.Cartesian3(-10.0, 7.0, 4.0); |
| | | |
| | | //静态 |
| | | // var position = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468, 1000); |
| | | var position = Cesium.Cartesian3.fromDegrees(a, b, g); |
| | | that.entityPeople = viewer.entities.add({//viewer.trackedEntity跟随 |
| | | name: url, |
| | | position: position, |
| | | model: { |
| | | uri: url, |
| | | }, |
| | | }); |
| | | if (once == 'once') { |
| | | viewer.trackedEntity = that.entityPeople; |
| | | } |
| | | |
| | | // var viewModel = {// 以下是工具栏 |
| | | // blackAndWhiteShow: false, |
| | | // blackAndWhiteGradations: 5.0, |
| | | // brightnessShow: false, |
| | | // brightnessValue: 0.5, |
| | | // nightVisionShow: false, |
| | | // silhouette: false, |
| | | // }; |
| | | |
| | | // Cesium.knockout.track(viewModel); |
| | | // var toolbar = document.getElementById("toolbarcesium"); |
| | | // Cesium.knockout.applyBindings(viewModel, toolbar); |
| | | // for (var name in viewModel) { |
| | | // if (viewModel.hasOwnProperty(name)) { |
| | | // Cesium.knockout |
| | | // .getObservable(viewModel, name) |
| | | // .subscribe(updatePostProcess); |
| | | // } |
| | | // } |
| | | |
| | | // if ( |
| | | // !Cesium.PostProcessStageLibrary.isSilhouetteSupported(viewer.scene) |
| | | // ) { |
| | | // window.alert( |
| | | // "This browser does not support the silhouette post process." |
| | | // ); |
| | | // } |
| | | |
| | | // var stages = viewer.scene.postProcessStages; |
| | | // var silhouette = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createSilhouetteStage() |
| | | // ); |
| | | // var blackAndWhite = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createBlackAndWhiteStage() |
| | | // ); |
| | | // var brightness = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createBrightnessStage() |
| | | // ); |
| | | // var nightVision = stages.add( |
| | | // Cesium.PostProcessStageLibrary.createNightVisionStage() |
| | | // ); |
| | | |
| | | // function updatePostProcess() { |
| | | // silhouette.enabled = Boolean(viewModel.silhouette); |
| | | // silhouette.uniforms.color = Cesium.Color.YELLOW; |
| | | // blackAndWhite.enabled = Boolean(viewModel.blackAndWhiteShow); |
| | | // blackAndWhite.uniforms.gradations = Number( |
| | | // viewModel.blackAndWhiteGradations |
| | | // ); |
| | | // brightness.enabled = Boolean(viewModel.brightnessShow); |
| | | // brightness.uniforms.brightness = Number(viewModel.brightnessValue); |
| | | // nightVision.enabled = Boolean(viewModel.nightVisionShow); |
| | | // } |
| | | // updatePostProcess(); |
| | | |
| | | }, |
| | | entityPeople: '', |
| | | seeEntity: true, |
| | | openEntity: false, |
| | | time: '', |
| | | beginPlay: function () { |
| | | var postion = [116.058987, 28.973468, 1000] |
| | | , a = 116.058987 |
| | | , b = 28.973468 |
| | | , g = 1000; |
| | | this.time = setInterval(() => { |
| | | |
| | | if (this.openEntity) { |
| | | // this.map.entities.remove(this.entityPeople)//删除entity |
| | | // this.map.entities.remove(this.map.trackedEntity)//删除entity |
| | | this.map.entities.removeAll(); |
| | | } else { |
| | | a += 0.01; |
| | | b += 0.01; |
| | | // g += 0.01; |
| | | this.beginCesium(a, b); |
| | | } |
| | | this.openEntity = !this.openEntity; |
| | | console.log(this.openEntity) |
| | | }, 1000); |
| | | }, |
| | | stopPlay: function () { |
| | | this.map.entities.removeAll(); |
| | | // clearInterval(this.time); |
| | | }, |
| | | seemodo: function () { |
| | | var that = this; |
| | | if (that.seeEntity) { |
| | | this.map.trackedEntity = that.entityPeople;//目标视野跟踪 |
| | | } else { |
| | | this.map.trackedEntity = ''; |
| | | } |
| | | that.seeEntity = !that.seeEntity; |
| | | console.log(that.seeEntity) |
| | | // console.log('seedom') |
| | | // this.map.entities.remove(this.entityPeople)//删除entity |
| | | }, |
| | | getInput: function () { |
| | | this.a = $('#modelDiagramjdu').val() == '' ? 116.058987 : +$('#modelDiagramjdu').val(); |
| | | this.b = $('#modelDiagramwdu').val() == '' ? 28.973468 : +$('#modelDiagramwdu').val(); |
| | | this.g = $('#modelDiagramgdu').val() == '' ? 1000 : +$('#modelDiagramgdu').val(); |
| | | }, |
| | | a: '', |
| | | b: '', |
| | | g: '', |
| | | //重复添加 |
| | | always: function () { |
| | | this.getInput(); |
| | | // console.log([a, b, g]) |
| | | this.beginCesium(this.a, this.b, this.g); |
| | | }, |
| | | //单次添加 |
| | | once: function () { |
| | | this.stopPlay(); |
| | | this.getInput(); |
| | | // console.log([a, b, g]) |
| | | this.beginCesium(this.a, this.b, this.g, 'once'); |
| | | }, |
| | | closeModo: function () { |
| | | if (this.openEntity) { |
| | | // this.map.entities.remove(this.entityPeople)//删除entity |
| | | // this.map.entities.remove(this.map.trackedEntity)//删除entity |
| | | this.map.entities.removeAll(); |
| | | } else { |
| | | this.getInput |
| | | // console.log([a, b, g]) |
| | | this.beginCesium(a, b, g); |
| | | } |
| | | this.openEntity = !this.openEntity; |
| | | console.log(this.openEntity) |
| | | // var that = this; |
| | | // if (that.seeEntity) { |
| | | // this.map.trackedEntity = that.entityPeople;//目标视野跟踪 |
| | | // } else { |
| | | // this.map.trackedEntity = ''; |
| | | // } |
| | | // viewer.entities.remove(that.entityPeople)//删除entity |
| | | |
| | | // viewer.entities.removeById(id)//根据id删除entity |
| | | |
| | | // viewer.entities.removeAll()//清空所有entity |
| | | |
| | | // viewer.entities.getById(id)// 获取enetity |
| | | |
| | | // viewer.entities.contains(entity)// 是否包含 |
| | | // viewer.entities.removeById('') |
| | | }, |
| | | beginModelDiagram: function () { |
| | | var that = this |
| | | , viewer = that.map |
| | | , scene = viewer.scene; |
| | | // scene.globe.show = false; |
| | | viewer.shouldAnimate = true; |
| | | var collect = new Cesium.InstanceLayer(scene._context) |
| | | , url = "./images/gltf/walk.gltf" |
| | | , gltf = viewer.entities.add({ |
| | | name: "gltf", |
| | | position: new Cesium.Cartesian3.fromDegrees(115.783206 - 0.002034006, 28.810602 - 0.005072179, 800), |
| | | model: { |
| | | uri: url |
| | | } |
| | | }); |
| | | viewer.zoomTo(gltf); |
| | | $("#modelDiagramSelOpt").change(function () { |
| | | var value = $(this).val(); |
| | | if (value === "1") { |
| | | collect.removeInstance(url, [collect._instances._array[0]._array[0].id]); |
| | | viewer.entities._show = true; |
| | | } else { |
| | | viewer.entities._show = false; |
| | | collect.add(url, |
| | | { |
| | | position: new Cesium.Cartesian3.fromDegrees(115.783206 - 0.002034006, 28.810602 - 0.005072179, 1000) |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | onClose: function () { |
| | | //面板关闭的时候触发 (when this panel is closed trigger) |
| | | }, |
| | | |
| | | onMinimize: function () { |
| | | this.resize(); |
| | | }, |
| | | |
| | | onMaximize: function () { |
| | | this.resize(); |
| | | }, |
| | | |
| | | resize: function () { |
| | | |
| | | }, |
| | | |
| | | |
| | | destroy: function () { |
| | | //销毁的时候触发 |
| | | //todo |
| | | //do something before this func |
| | | this.inherited(arguments); |
| | | } |
| | | |
| | | }); |
| | | }); |
| | |
| | | .jimu-widget-modelDiagram { |
| | | position: absolute !important; |
| | | font-size: 14px; |
| | | height: 40px !important; |
| | | height: 120px !important; |
| | | width: 280px !important; |
| | | /* 240px */ |
| | | background: rgb(254, 254, 254); |
| | |
| | | z-index: 11 !important; |
| | | top: 72px !important; |
| | | bottom: auto !important; |
| | | right: 60px !important; |
| | | right: 383px !important; |
| | | left: auto !important; |
| | | box-shadow: 0 0 8px #fff; |
| | | display: none; |
| | |
| | | font-size: 16px; |
| | | border-radius: 5px; |
| | | box-shadow: 2px 2px 15px -5px #378ef1; |
| | | display: none; |
| | | /* border: 1px solid rgb(128, 124, 124); */ |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .modelDiagramMain { |
| | | width:230px; |
| | | height: 40px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | position: absolute; |
| | | top: 1.5px; |
| | | left: 10px; |
| | | cursor: pointer; |
| | | } |
| | | .jimu-widget-modelDiagram .closemodoinput{ |
| | | width: 50px; |
| | | |
| | | .jimu-widget-modelDiagram .inp { |
| | | width: 230px; |
| | | height: 130px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | /* border: 1px solid rgb(128, 124, 124); */ |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .inp .closemodoinput { |
| | | width: 200px; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .but { |
| | | width: 230px; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | /* border: 1px solid rgb(128, 124, 124); */ |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .but .buts { |
| | | line-height: 30px; |
| | | width: 80px; |
| | | height: 30px; |
| | | font-size: 16px; |
| | | border-radius: 5px; |
| | | box-shadow: 2px 2px 15px -5px #378ef1; |
| | | /* border: 1px solid salmon; */ |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .but .buts:hover { |
| | | box-shadow: 2px 2px 25px -5px #1679eb; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .closemodo:hover { |
| | |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .beginPlay { |
| | | border: 1px solid salmon; |
| | | display: none; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .stopPlay { |
| | | border: 1px solid salmon; |
| | | display: none; |
| | | } |
| | |
| | | name: '剖面分析', |
| | | classs: 'profileAnalysis-tool', |
| | | img: './images/addL/剖面分析.png' |
| | | }, { |
| | | name: '建造实体', |
| | | classs: 'modelDiagram-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | // , { |
| | | // name: '坡度分析', |
| | |
| | | dom.replaceWith(str); |
| | | |
| | | $('.closesspatialAnalysis').click(() => { |
| | | that.closeOnceUse(); |
| | | $('.jimu-widget-spatialAnalysis').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | }) |
| | | |
| | | // 可视分析 |
| | | $('.visibleArea-tool').click(function () { |
| | | that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | | // 关闭卷帘 |
| | | topic.publish('closeRolling', 'Rolling'); |
| | | // 关闭分屏 |
| | | topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // 关闭标记 |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $(".jimu-widget-visibleArea").show(); |
| | | }) |
| | | // 剖面分析 |
| | | $('.profileAnalysis-tool').click(function () { |
| | | that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | | // 关闭卷帘 |
| | | topic.publish('closeRolling', 'Rolling'); |
| | | // 关闭分屏 |
| | | topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // 关闭标记 |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $(".jimu-widget-profileAnalysis").show(); |
| | | }) |
| | | //坡度分析 |
| | | $('.slope-tool').click(function () { |
| | | that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | | // 关闭卷帘 |
| | | topic.publish('closeRolling', 'Rolling'); |
| | | // 关闭分屏 |
| | | topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // 关闭标记 |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $(".jimu-widget-slope").show(); |
| | | topic.publish('getbeginSlope', this.beginSlope); |
| | | }) |
| | | //模型 |
| | | $('.modelDiagram-tool').click(function () { |
| | | that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | | // 关闭卷帘 |
| | | topic.publish('closeRolling', 'Rolling'); |
| | | // 关闭分屏 |
| | | topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // 关闭标记 |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | // topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | | that.closeOnceUse(); |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // // 关闭坡度 |
| | | // // topic.publish('closes', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // //关闭飞行 |
| | | // $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | // topic.publish('closeFly', 'closeFly'); |
| | | |
| | | $('.jimu-widget-modelDiagram').show(); |
| | | // topic.publish('getbeginSlope', this.beginSlope); |
| | |
| | | $('.tool-y-box').hide(); |
| | | } |
| | | }, |
| | | |
| | | closeOnceUse: function () { |
| | | var that = this; |
| | | that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // 关闭量算 |
| | | topic.publish('closeMeasurement', 'Measurement'); |
| | | // 关闭卷帘 |
| | | topic.publish('closeRolling', 'Rolling'); |
| | | // 关闭分屏 |
| | | topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // 关闭标记 |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $('.tool-y-box').stop().hide(); |
| | | //关闭飞行 |
| | | $('.jimu-widget-visualAngle').find('.v-a-Two').removeClass('on');//清楚样式 |
| | | topic.publish('closeFly', 'closeFly'); |
| | | //清除实体 |
| | | this.map.entities.removeAll(); |
| | | $(".jimu-widget-modelDiagram").hide(); |
| | | }, |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | | // var domHtmls = [ |