| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent aae6c8f commit 35ad52d
27 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -120,22 +120,24 @@ export default class AdvancedAnalysisManager { | |||
| 120 | 120 | * @param {Array} posEnds 轨迹线终点 | |
| 121 | 121 | * @param {Object} options 动态航班参数 | |
| 122 | 122 | * @param {Boolean} [options.isAdd] 是否已添加航班线 | |
| 123 | - * @returns {Object} plague 返回动态航班实例 | ||
| 123 | + * @param {Color} [options.color] 轨迹线混合颜色,基调为红色 | ||
| 124 | + * @param {Number} [options.duration] 周期时间,单位毫秒 | ||
| 125 | + * @returns {Object} dynamicPolyline 返回动态航班实例 | ||
| 124 | 126 | */ | |
| 125 | 127 | createDynamicPolyline(posStart, posEnds, options) { | |
| 126 | 128 | const optionsParam = Cesium.defaultValue(options, {}); | |
| 127 | - let plague; | ||
| 129 | + let dynamicPolyline; | ||
| 128 | 130 | if (posStart !== undefined && posEnds !== undefined) { | |
| 129 | - plague = new Cesium.DynamicPolyline(this.viewer, { | ||
| 130 | - center: posStart, | ||
| 131 | - cities: posEnds, | ||
| 132 | - isAdd: Cesium.defaultValue(optionsParam.isAdd, false) | ||
| 131 | + dynamicPolyline = new Cesium.DynamicPolyline(this.viewer, posStart, posEnds, { | ||
| 132 | + isAdd: Cesium.defaultValue(optionsParam.isAdd, false), | ||
| 133 | + color: Cesium.defaultValue(optionsParam.color, Cesium.Color.ORANGE), | ||
| 134 | + duration: 3000 | ||
| 133 | 135 | }); | |
| 134 | - plague.setVisible('add'); | ||
| 136 | + dynamicPolyline.setVisible('add'); | ||
| 135 | 137 | } else { | |
| 136 | 138 | return undefined; | |
| 137 | 139 | } | |
| 138 | - return plague; | ||
| 140 | + return dynamicPolyline; | ||
| 139 | 141 | } | |
| 140 | 142 | ||
| 141 | 143 | /** | |
@@ -432,9 +434,9 @@ export default class AdvancedAnalysisManager { | |||
| 432 | 434 | } | |
| 433 | 435 | ||
| 434 | 436 | /** | |
| 435 | - * 烟雾粒子特效 | ||
| 437 | + * 动态粒子特效 | ||
| 436 | 438 | * @function module:客户端可视化分析.AdvancedAnalysisManager.prototype.createParticle | |
| 437 | - * @param {Object} options 烟雾粒子特效参数 | ||
| 439 | + * @param {Object} options 动态粒子特效参数 | ||
| 438 | 440 | * @param {String} options.imageUrl 粒子url | |
| 439 | 441 | * @param {String} options.modelUrl 模型url | |
| 440 | 442 | * @param {Date} [options.startTime] 开始时间 | |
@@ -447,7 +449,7 @@ export default class AdvancedAnalysisManager { | |||
| 447 | 449 | const particleSystem = new Cesium.ParticleC(this.viewer, { | |
| 448 | 450 | imageUrl: optionsParam.imageUrl, | |
| 449 | 451 | modelUrl: optionsParam.modelUrl, | |
| 450 | - startTime: Cesium.defaultValue(optionsParam.startTime, new Cesium.Date(2015, 2, 25, 16)), | ||
| 452 | + startTime: Cesium.defaultValue(optionsParam.startTime, new Date(2015, 2, 25, 16)), | ||
| 451 | 453 | duration: Cesium.defaultValue(optionsParam.duration, 120), | |
| 452 | 454 | positionStart: Cesium.defaultValue(optionsParam.positionStart, Cesium.Cartesian3.fromDegrees(-75.15787310614596, 39.97862668312678)), | |
| 453 | 455 | positionEnd: Cesium.defaultValue(optionsParam.positionEnd, Cesium.Cartesian3.fromDegrees(-75.1633691390455, 39.95355089912078)) | |
@@ -457,22 +459,22 @@ export default class AdvancedAnalysisManager { | |||
| 457 | 459 | } | |
| 458 | 460 | ||
| 459 | 461 | /** | |
| 460 | - * 移除烟雾粒子特效 | ||
| 462 | + * 移除动态粒子特效 | ||
| 461 | 463 | * @function module:客户端可视化分析.AdvancedAnalysisManager.prototype.removeParticle | |
| 462 | - * @param {Object} particle 烟雾粒子特效实例 | ||
| 464 | + * @param {Object} particle 动态粒子特效实例 | ||
| 463 | 465 | */ | |
| 464 | 466 | removeParticle(particle) { | |
| 465 | 467 | particle.remove(); | |
| 466 | 468 | this.scene.requestRender(); | |
| 467 | 469 | } | |
| 468 | 470 | ||
| 469 | 471 | /** | |
| 470 | - * 火焰特效 | ||
| 472 | + * 火焰或烟雾粒子特效 | ||
| 471 | 473 | * @function module:客户端可视化分析.AdvancedAnalysisManager.prototype.createFire | |
| 472 | - * @param {String} modelUrl 模型url | ||
| 473 | - * @param {String} imageUrl 火焰图片url | ||
| 474 | + * @param {String} imageUrl 粒子特效图片url | ||
| 474 | 475 | * @param {Array<Number>} position 模型位置,position[0]:经度,position[1]:纬度,position[2]:高度 | |
| 475 | - * @param {Object} options 火焰特效参数 | ||
| 476 | + * @param {Object} options 粒子特效参数 | ||
| 477 | + * @param {String} [options.modelUrl] 模型url | ||
| 476 | 478 | * @param {Number} [options.minimumPixelSize] 模型最小像素尺寸 | |
| 477 | 479 | * @param {Number} [options.startScale] 起始规模 | |
| 478 | 480 | * @param {Number} [options.endScale] 终止规模 | |
@@ -481,15 +483,14 @@ export default class AdvancedAnalysisManager { | |||
| 481 | 483 | * @param {Cartesian2} [options.imageSize] 图像尺寸 | |
| 482 | 484 | * @param {Number} [options.emissionRate] 排放率 | |
| 483 | 485 | * @param {Number} [options.lifetime] 持续时间 | |
| 484 | - * @returns {Object} result 返回火焰特效中火焰粒子与模型entity | ||
| 486 | + * @returns {Object} result 返回粒子特效实例 | ||
| 485 | 487 | */ | |
| 486 | - createFire(modelUrl, imageUrl, position, options) { | ||
| 488 | + createFire(imageUrl, position, options) { | ||
| 487 | 489 | this.viewer.clock.shouldAnimate = true; | |
| 488 | 490 | const optionsParam = Cesium.defaultValue(options, {}); | |
| 489 | - const fire = new Cesium.Fire(this.viewer, { | ||
| 490 | - modelUrl, | ||
| 491 | - imageUrl, | ||
| 492 | - position, | ||
| 491 | + const fire = new Cesium.Fire(this.viewer, imageUrl, position, { | ||
| 492 | + modelUrl: optionsParam.modelUrl, | ||
| 493 | + minimumPixelSize: Cesium.defaultValue(optionsParam.minimumPixelSize, 64.0), | ||
| 493 | 494 | startScale: Cesium.defaultValue(optionsParam.startScale, 1.0), | |
| 494 | 495 | endScale: Cesium.defaultValue(optionsParam.endScale, 4.0), | |
| 495 | 496 | particleLife: Cesium.defaultValue(optionsParam.particleLife, 1.0), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,5 @@ | |||
| 1 | 1 | import { CesiumZondy } from '../../core/Base'; | |
| 2 | + import axios from 'axios'; | ||
| 2 | 3 | ||
| 3 | 4 | /** | |
| 4 | 5 | * @author IGServer-邬俊惠 | |
@@ -166,12 +167,23 @@ export class G3DDocQuery { | |||
| 166 | 167 | var postData = null; | |
| 167 | 168 | if (type && type.toLowerCase() === 'post') { | |
| 168 | 169 | postData = querystring; | |
| 170 | + axios.post(url, postData) | ||
| 171 | + .then(res => { | ||
| 172 | + successCallback && successCallback(res.data, res, o.layerIndex); | ||
| 173 | + }) | ||
| 174 | + .catch(error=>{ | ||
| 175 | + errorCallback && errorCallback(error); | ||
| 176 | + }); | ||
| 169 | 177 | } else { | |
| 170 | 178 | url = url + "?" + querystring; | |
| 179 | + axios.get(url) | ||
| 180 | + .then(res => { | ||
| 181 | + successCallback && successCallback(res.data, res, o.layerIndex); | ||
| 182 | + }) | ||
| 183 | + .catch(error=>{ | ||
| 184 | + errorCallback && errorCallback(error); | ||
| 185 | + }); | ||
| 171 | 186 | } | |
| 172 | - Util.corsAjax(url, type, postData, function (res, code) { | ||
| 173 | - successCallback && successCallback(res, code, o.layerIndex); | ||
| 174 | - }, errorCallback, 'json', this.proxy); | ||
| 175 | 187 | } | |
| 176 | 188 | } | |
| 177 | 189 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments