| @@ -9,8 +9,7 @@ console.clear() | |||
| // eslint-disable-next-line no-console | |||
| console.log( | |||
| `%c \n DC-SDK \n %c \n 用数字描绘世界之美 %c \n | |||
| 版本:${__VERSION__} | |||
| 编译日期:${__TIME__} | |||
| 版本:${__VERSION__} - ${__TIME__.substr(0, 10)} | |||
| Cesium版本:1.76 | |||
| 开发作者:${__AUTHOR__} | |||
| 网站主页: ${__HOME_PAGE__} | |||
| @@ -54,7 +54,10 @@ class MouseEvent extends Event { | |||
| cartesian = scene.pickPosition(position) | |||
| } | |||
| let surfaceCartesian | |||
| if (scene.mode === Cesium.SceneMode.SCENE3D) { | |||
| if ( | |||
| scene.mode === Cesium.SceneMode.SCENE3D && | |||
| !(this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider) | |||
| ) { | |||
| let ray = scene.camera.getPickRay(position) | |||
| surfaceCartesian = scene.globe.pick(ray, scene) | |||
| } else { | |||
| @@ -230,16 +230,18 @@ class DomUtil { | |||
| /** | |||
| * Creates video | |||
| * @param url | |||
| * @param type | |||
| * @param className | |||
| * @param container | |||
| * @returns {HTMLElement} | |||
| */ | |||
| static createVideo(url, type, className, container = null) { | |||
| static createVideo(url, className, container = null) { | |||
| let videoEl = this.create('video', className, container) | |||
| let source = this.create('source', '', videoEl) | |||
| source.setAttribute('src', url) | |||
| source.setAttribute('type', `video/${type}`) | |||
| let map4 = this.create('source', '', videoEl) | |||
| map4.setAttribute('src', url) | |||
| map4.setAttribute('type', 'video/map4') | |||
| let mov = this.create('source', '', videoEl) | |||
| mov.setAttribute('src', url) | |||
| mov.setAttribute('type', 'video/quicktime') | |||
| return videoEl | |||
| } | |||
| } | |||
| @@ -23,15 +23,15 @@ class ContextMenu extends Widget { | |||
| this._defaultMenu = [ | |||
| { | |||
| label: '飞到默认位置', | |||
| callback: viewer => { | |||
| viewer.camera.flyHome(0) | |||
| callback: e => { | |||
| this._viewer.camera.flyHome(0) | |||
| }, | |||
| context: this | |||
| }, | |||
| { | |||
| label: '取消飞行', | |||
| callback: viewer => { | |||
| viewer.camera.cancelFlight() | |||
| callback: e => { | |||
| this._viewer.camera.cancelFlight() | |||
| }, | |||
| context: this | |||
| } | |||