cesium_dev_kit 1.0.47 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
- var CesiumNavigation = _interopDefault(require('cesium-navigation-es6'));
8
7
  var SuperGif = _interopDefault(require('libgif'));
9
8
  var turf = require('@turf/turf');
10
9
  var dat = require('dat.gui');
11
10
  var echarts = _interopDefault(require('echarts'));
11
+ var alternateCesium = require('cesium');
12
12
 
13
13
  // 输入16进制颜色值 转 rgb 的数组值 255
14
14
  function colorRgb(inColor) {
@@ -118,11 +118,6 @@ class Controller {
118
118
  // 显示 fps
119
119
  // viewer.scene.debugShowFramesPerSecond = true
120
120
 
121
- // 是否需要 初始化 cesium-navigation 控件
122
- if (extreaConfig['initNavigate']) {
123
- this.initCesiumNavigation(viewer);
124
- }
125
-
126
121
  // 增加配置图层
127
122
  this.setConfigMapList(viewer, MapImageryList);
128
123
  // 消除锯齿
@@ -130,21 +125,6 @@ class Controller {
130
125
  this.viewer = viewer;
131
126
  return viewer;
132
127
  }
133
- initCesiumNavigation(viewer) {
134
- const options = {};
135
- // 用于在使用重置导航重置地图视图时设置默认视图控制。接受的值是Cesium.Cartographic 和 Cesium.Rectangle.
136
- options.defaultResetView = new Cesium$1.Rectangle.fromDegrees(80, 22, 130, 50); // new Cesium.Rectangle.fromDegrees(113.8980, 22.4899, 113.9686, 22.5438)
137
- // 用于启用或禁用罗盘。true是启用罗盘,false是禁用罗盘。默认值为true。如果将选项设置为false,则罗盘将不会添加到地图中。
138
- options.enableCompass = true;
139
- // 用于启用或禁用缩放控件。true是启用,false是禁用。默认值为true。如果将选项设置为false,则缩放控件将不会添加到地图中。
140
- options.enableZoomControls = true;
141
- // 用于启用或禁用距离图例。true是启用,false是禁用。默认值为true。如果将选项设置为false,距离图例将不会添加到地图中。
142
- options.enableDistanceLegend = true;
143
- // 用于启用或禁用指南针外环。true是启用,false是禁用。默认值为true。如果将选项设置为false,则该环将可见但无效。
144
- options.enableCompassOuterRing = true;
145
- // 注意需要new 否则Cannot set properties of undefined (setting 'terria')
146
- new CesiumNavigation(viewer, options);
147
- }
148
128
  setOneimageryProvider(MapImagery) {
149
129
  if (MapImagery.classConfig.customTags) {
150
130
  MapImagery.classConfig.customTags = evil('(' + MapImagery.classConfig.customTags + ')');
@@ -13630,7 +13610,7 @@ const prototypeExtends = function (viewer, cesiumGlobal) {
13630
13610
  * @returns
13631
13611
  */
13632
13612
  function initCesium({
13633
- cesiumGlobal,
13613
+ cesiumGlobal = alternateCesium,
13634
13614
  containerId,
13635
13615
  viewerConfig = {},
13636
13616
  extreaConfig = {},