cesium_dev_kit 1.0.49 → 1.0.51
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 +85 -110
- package/dist/index.min.js +1 -1
- package/package.json +4 -5
package/dist/index.js
CHANGED
|
@@ -8,7 +8,6 @@ var SuperGif = _interopDefault(require('libgif'));
|
|
|
8
8
|
var turf = require('@turf/turf');
|
|
9
9
|
var dat = require('dat.gui');
|
|
10
10
|
var echarts = _interopDefault(require('echarts'));
|
|
11
|
-
var alternateCesium = require('cesium');
|
|
12
11
|
|
|
13
12
|
// 输入16进制颜色值 转 rgb 的数组值 255
|
|
14
13
|
function colorRgb(inColor) {
|
|
@@ -115,9 +114,6 @@ class Controller {
|
|
|
115
114
|
viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
// 显示 fps
|
|
119
|
-
// viewer.scene.debugShowFramesPerSecond = true
|
|
120
|
-
|
|
121
117
|
// 增加配置图层
|
|
122
118
|
this.setConfigMapList(viewer, MapImageryList);
|
|
123
119
|
// 消除锯齿
|
|
@@ -223,14 +219,13 @@ class Controller {
|
|
|
223
219
|
}
|
|
224
220
|
|
|
225
221
|
let Cesium$2 = null;
|
|
226
|
-
|
|
227
222
|
/**
|
|
228
223
|
* 图形模块
|
|
229
224
|
* 用于向地图加载各种实体对象
|
|
230
225
|
*
|
|
231
226
|
* @param {*} viewer
|
|
232
227
|
*/
|
|
233
|
-
function Graphics(viewer, cesiumGlobal) {
|
|
228
|
+
function Graphics(viewer, cesiumGlobal, defaultStatic) {
|
|
234
229
|
if (viewer) {
|
|
235
230
|
Cesium$2 = cesiumGlobal;
|
|
236
231
|
this._graphicsLayer = new Cesium$2.CustomDataSource('graphicsLayer');
|
|
@@ -562,7 +557,7 @@ Graphics.prototype = {
|
|
|
562
557
|
topRadius: options.topRadius || 500,
|
|
563
558
|
bottomRadius: options.bottomRadius || 500,
|
|
564
559
|
material: options.material || new Cesium$2.ImageMaterialProperty({
|
|
565
|
-
image: options.
|
|
560
|
+
image: options.img || this.getDfSt(['graphic', 'craeteRotateCylinderGraphics']) || 'static/data/images/file/cc2.png',
|
|
566
561
|
transparent: true,
|
|
567
562
|
repeat: {
|
|
568
563
|
x: 1,
|
|
@@ -626,7 +621,7 @@ Graphics.prototype = {
|
|
|
626
621
|
_scale = options.scale || null,
|
|
627
622
|
_scale2 = options.scale2 || null,
|
|
628
623
|
_material = options.material || new Cesium$2.ImageMaterialProperty({
|
|
629
|
-
image: options.imge || 'static/data/images/Textures/circle_bg.png',
|
|
624
|
+
image: options.imge || this.getDfSt(['graphic', 'craeteDynamicCricleGraphics']) || 'static/data/images/Textures/circle_bg.png',
|
|
630
625
|
transparent: true
|
|
631
626
|
});
|
|
632
627
|
entity.position = new Cesium$2.CallbackProperty(function () {
|
|
@@ -681,7 +676,7 @@ Graphics.prototype = {
|
|
|
681
676
|
wallEntity.wall = {
|
|
682
677
|
positions: options.positions,
|
|
683
678
|
material: new Cesium$2.ImageMaterialProperty({
|
|
684
|
-
image: 'static/data/images/Textures/fence.png',
|
|
679
|
+
image: options.img || this.getDfSt(['graphic', 'craeteDynamicShadeWallGraphics']) || 'static/data/images/Textures/fence.png',
|
|
685
680
|
transparent: true,
|
|
686
681
|
color: new Cesium$2.CallbackProperty(function () {
|
|
687
682
|
if (num % 2 === 0) {
|
|
@@ -706,7 +701,7 @@ Graphics.prototype = {
|
|
|
706
701
|
if (options && options.position) {
|
|
707
702
|
var $this = this,
|
|
708
703
|
img = document.createElement('img');
|
|
709
|
-
img.src = options.img || 'static/data/images/file/div1.png';
|
|
704
|
+
img.src = options.img || this.getDfSt(['graphic', 'createCustomDefBillboardGraphics']) || 'static/data/images/file/div1.png';
|
|
710
705
|
|
|
711
706
|
// 绘制canvas
|
|
712
707
|
const drawCompanyTip = function (options) {
|
|
@@ -954,7 +949,7 @@ let Cesium$3 = null;
|
|
|
954
949
|
* 材质模块
|
|
955
950
|
* @param {*} viewer
|
|
956
951
|
*/
|
|
957
|
-
function Material(viewer, cesiumGlobal) {
|
|
952
|
+
function Material(viewer, cesiumGlobal, defaultStatic) {
|
|
958
953
|
if (viewer) {
|
|
959
954
|
Cesium$3 = cesiumGlobal;
|
|
960
955
|
this._installMaterial();
|
|
@@ -1375,7 +1370,7 @@ Material.prototype = {
|
|
|
1375
1370
|
};
|
|
1376
1371
|
Cesium$3.Scene.PolylineCityLinkMaterialProperty = PolylineCityLinkMaterialProperty;
|
|
1377
1372
|
Material.PolylineCityLinkType = 'PolylineCityLink';
|
|
1378
|
-
Material.PolylineCityLinkImage = 'static/data/images/Textures/meteor_01.png';
|
|
1373
|
+
Material.PolylineCityLinkImage = this.getDfSt(['material', 'PolylineCityLinkMaterialProperty']) || 'static/data/images/Textures/meteor_01.png';
|
|
1379
1374
|
Material._materialCache.addMaterial(Material.PolylineCityLinkType, {
|
|
1380
1375
|
fabric: {
|
|
1381
1376
|
type: Material.PolylineCityLinkType,
|
|
@@ -1444,7 +1439,7 @@ Material.prototype = {
|
|
|
1444
1439
|
});
|
|
1445
1440
|
Cesium$3.Scene.WarnLinkMaterialProperty = WarnLinkMaterialProperty;
|
|
1446
1441
|
Material.WarnLinkType = 'WarnWallLinkType';
|
|
1447
|
-
Material.WarnLinkImage = 'static/data/images/Textures/jsx2.png';
|
|
1442
|
+
Material.WarnLinkImage = this.getDfSt(['material', 'WarnLinkMaterialProperty']) || 'static/data/images/Textures/jsx2.png';
|
|
1448
1443
|
Material._materialCache.addMaterial(Material.WarnLinkType, {
|
|
1449
1444
|
fabric: {
|
|
1450
1445
|
type: Material.WarnLinkType,
|
|
@@ -1828,10 +1823,12 @@ Shaders.prototype = {
|
|
|
1828
1823
|
};
|
|
1829
1824
|
|
|
1830
1825
|
let Cesium$4 = {};
|
|
1831
|
-
|
|
1826
|
+
let dfSt = undefined;
|
|
1827
|
+
function Base(viewer, cesiumGlobal, defaultStatic) {
|
|
1832
1828
|
if (viewer) {
|
|
1833
1829
|
this._viewer = viewer;
|
|
1834
1830
|
Cesium$4 = cesiumGlobal;
|
|
1831
|
+
dfSt = defaultStatic;
|
|
1835
1832
|
Cesium$4.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmYzkwZWEwYy1mMmIwLTQwYjctOWJlOC00OWU4ZWU1YTZhOTkiLCJpZCI6MTIxODIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NjA0OTUyNDN9.wagvw7GxUjxvHXO6m2jjX5Jh9lN0UyTJhNGEcSm2pgE';
|
|
1836
1833
|
this._drawLayer = new Cesium$4.CustomDataSource('drawLayer');
|
|
1837
1834
|
viewer && viewer.dataSources.add(this._drawLayer);
|
|
@@ -1849,16 +1846,29 @@ Base.prototype = {
|
|
|
1849
1846
|
createGraphics: function () {
|
|
1850
1847
|
return new Cesium$4.Entity();
|
|
1851
1848
|
},
|
|
1849
|
+
getDfSt(attrArr) {
|
|
1850
|
+
if (dfSt) {
|
|
1851
|
+
const res = attrArr.reduce((pre, curr) => {
|
|
1852
|
+
if (pre) {
|
|
1853
|
+
return pre[curr];
|
|
1854
|
+
} else {
|
|
1855
|
+
return dfSt[curr];
|
|
1856
|
+
}
|
|
1857
|
+
}, undefined);
|
|
1858
|
+
return dfSt.baseService + res;
|
|
1859
|
+
}
|
|
1860
|
+
return undefined;
|
|
1861
|
+
},
|
|
1852
1862
|
// 天空盒
|
|
1853
1863
|
setOneSkyBox: function () {
|
|
1854
1864
|
return new Cesium$4.SkyBox({
|
|
1855
1865
|
sources: {
|
|
1856
|
-
positiveX: 'static/data/images/SkyBox/00h+00.jpg',
|
|
1857
|
-
negativeX: 'static/data/images/SkyBox/12h+00.jpg',
|
|
1858
|
-
positiveY: 'static/data/images/SkyBox/06h+00.jpg',
|
|
1859
|
-
negativeY: 'static/data/images/SkyBox/18h+00.jpg',
|
|
1860
|
-
positiveZ: 'static/data/images/SkyBox/06h+90.jpg',
|
|
1861
|
-
negativeZ: 'static/data/images/SkyBox/06h-90.jpg'
|
|
1866
|
+
positiveX: this.getDfSt(['skyBox', 'one', 'positiveX']) || 'static/data/images/SkyBox/00h+00.jpg',
|
|
1867
|
+
negativeX: this.getDfSt(['skyBox', 'one', 'negativeX']) || 'static/data/images/SkyBox/12h+00.jpg',
|
|
1868
|
+
positiveY: this.getDfSt(['skyBox', 'one', 'positiveY']) || 'static/data/images/SkyBox/06h+00.jpg',
|
|
1869
|
+
negativeY: this.getDfSt(['skyBox', 'one', 'negativeY']) || 'static/data/images/SkyBox/18h+00.jpg',
|
|
1870
|
+
positiveZ: this.getDfSt(['skyBox', 'one', 'positiveZ']) || 'static/data/images/SkyBox/06h+90.jpg',
|
|
1871
|
+
negativeZ: this.getDfSt(['skyBox', 'one', 'negativeZ']) || 'static/data/images/SkyBox/06h-90.jpg'
|
|
1862
1872
|
}
|
|
1863
1873
|
});
|
|
1864
1874
|
},
|
|
@@ -1866,12 +1876,12 @@ Base.prototype = {
|
|
|
1866
1876
|
setTwoSkyBox: function () {
|
|
1867
1877
|
return new Cesium$4.SkyBox({
|
|
1868
1878
|
sources: {
|
|
1869
|
-
positiveX: 'static/data/images/SkyBox/Version2_dark_px.jpg',
|
|
1870
|
-
negativeX: 'static/data/images/SkyBox/Version2_dark_mx.jpg',
|
|
1871
|
-
positiveY: 'static/data/images/SkyBox/Version2_dark_py.jpg',
|
|
1872
|
-
negativeY: 'static/data/images/SkyBox/Version2_dark_my.jpg',
|
|
1873
|
-
positiveZ: 'static/data/images/SkyBox/Version2_dark_pz.jpg',
|
|
1874
|
-
negativeZ: 'static/data/images/SkyBox/Version2_dark_mz.jpg'
|
|
1879
|
+
positiveX: this.getDfSt(['skyBox', 'two', 'negativeZ']) || 'static/data/images/SkyBox/Version2_dark_px.jpg',
|
|
1880
|
+
negativeX: this.getDfSt(['skyBox', 'two', 'negativeX']) || 'static/data/images/SkyBox/Version2_dark_mx.jpg',
|
|
1881
|
+
positiveY: this.getDfSt(['skyBox', 'two', 'positiveY']) || 'static/data/images/SkyBox/Version2_dark_py.jpg',
|
|
1882
|
+
negativeY: this.getDfSt(['skyBox', 'two', 'negativeY']) || 'static/data/images/SkyBox/Version2_dark_my.jpg',
|
|
1883
|
+
positiveZ: this.getDfSt(['skyBox', 'two', 'positiveZ']) || 'static/data/images/SkyBox/Version2_dark_pz.jpg',
|
|
1884
|
+
negativeZ: this.getDfSt(['skyBox', 'two', 'negativeZ']) || 'static/data/images/SkyBox/Version2_dark_mz.jpg'
|
|
1875
1885
|
}
|
|
1876
1886
|
});
|
|
1877
1887
|
},
|
|
@@ -1879,12 +1889,12 @@ Base.prototype = {
|
|
|
1879
1889
|
setThreeSkyBox: function () {
|
|
1880
1890
|
return new Cesium$4.SkyBox({
|
|
1881
1891
|
sources: {
|
|
1882
|
-
positiveX: 'static/data/images/SkyBox/tycho2t3_80_pxs.jpg',
|
|
1883
|
-
negativeX: 'static/data/images/SkyBox/tycho2t3_80_mxs.jpg',
|
|
1884
|
-
positiveY: 'static/data/images/SkyBox/tycho2t3_80_pys.jpg',
|
|
1885
|
-
negativeY: 'static/data/images/SkyBox/tycho2t3_80_mys.jpg',
|
|
1886
|
-
positiveZ: 'static/data/images/SkyBox/tycho2t3_80_pzs.jpg',
|
|
1887
|
-
negativeZ: 'static/data/images/SkyBox/tycho2t3_80_mzs.jpg'
|
|
1892
|
+
positiveX: this.getDfSt(['skyBox', 'three', 'negativeZ']) || 'static/data/images/SkyBox/tycho2t3_80_pxs.jpg',
|
|
1893
|
+
negativeX: this.getDfSt(['skyBox', 'three', 'negativeX']) || 'static/data/images/SkyBox/tycho2t3_80_mxs.jpg',
|
|
1894
|
+
positiveY: this.getDfSt(['skyBox', 'three', 'positiveY']) || 'static/data/images/SkyBox/tycho2t3_80_pys.jpg',
|
|
1895
|
+
negativeY: this.getDfSt(['skyBox', 'three', 'negativeY']) || 'static/data/images/SkyBox/tycho2t3_80_mys.jpg',
|
|
1896
|
+
positiveZ: this.getDfSt(['skyBox', 'three', 'positiveZ']) || 'static/data/images/SkyBox/tycho2t3_80_pzs.jpg',
|
|
1897
|
+
negativeZ: this.getDfSt(['skyBox', 'three', 'negativeZ']) || 'static/data/images/SkyBox/tycho2t3_80_mzs.jpg'
|
|
1888
1898
|
}
|
|
1889
1899
|
});
|
|
1890
1900
|
},
|
|
@@ -1892,12 +1902,12 @@ Base.prototype = {
|
|
|
1892
1902
|
setOneGroundSkyBox: function () {
|
|
1893
1903
|
return new Cesium$4.Scene.GroundSkyBox({
|
|
1894
1904
|
sources: {
|
|
1895
|
-
positiveX: 'static/data/images/SkyBox/rightav9.jpg',
|
|
1896
|
-
negativeX: 'static/data/images/SkyBox/leftav9.jpg',
|
|
1897
|
-
positiveY: 'static/data/images/SkyBox/frontav9.jpg',
|
|
1898
|
-
negativeY: 'static/data/images/SkyBox/backav9.jpg',
|
|
1899
|
-
positiveZ: 'static/data/images/SkyBox/topav9.jpg',
|
|
1900
|
-
negativeZ: 'static/data/images/SkyBox/bottomav9.jpg'
|
|
1905
|
+
positiveX: this.getDfSt(['skyBox', 'nearOne', 'positiveX']) || 'static/data/images/SkyBox/rightav9.jpg',
|
|
1906
|
+
negativeX: this.getDfSt(['skyBox', 'nearOne', 'negativeX']) || 'static/data/images/SkyBox/leftav9.jpg',
|
|
1907
|
+
positiveY: this.getDfSt(['skyBox', 'nearOne', 'positiveY']) || 'static/data/images/SkyBox/frontav9.jpg',
|
|
1908
|
+
negativeY: this.getDfSt(['skyBox', 'nearOne', 'negativeY']) || 'static/data/images/SkyBox/backav9.jpg',
|
|
1909
|
+
positiveZ: this.getDfSt(['skyBox', 'nearOne', 'positiveZ']) || 'static/data/images/SkyBox/topav9.jpg',
|
|
1910
|
+
negativeZ: this.getDfSt(['skyBox', 'nearOne', 'negativeZ']) || 'static/data/images/SkyBox/bottomav9.jpg'
|
|
1901
1911
|
}
|
|
1902
1912
|
});
|
|
1903
1913
|
},
|
|
@@ -1905,12 +1915,12 @@ Base.prototype = {
|
|
|
1905
1915
|
setTwoGroundSkyBox: function () {
|
|
1906
1916
|
return new Cesium$4.Scene.GroundSkyBox({
|
|
1907
1917
|
sources: {
|
|
1908
|
-
positiveX: 'static/data/images/SkyBox/SunSetRight.png',
|
|
1909
|
-
negativeX: 'static/data/images/SkyBox/SunSetLeft.png',
|
|
1910
|
-
positiveY: 'static/data/images/SkyBox/SunSetFront.png',
|
|
1911
|
-
negativeY: 'static/data/images/SkyBox/SunSetBack.png',
|
|
1912
|
-
positiveZ: 'static/data/images/SkyBox/SunSetUp.png',
|
|
1913
|
-
negativeZ: 'static/data/images/SkyBox/SunSetDown.png'
|
|
1918
|
+
positiveX: this.getDfSt(['skyBox', 'nearTwo', 'positiveX']) || 'static/data/images/SkyBox/SunSetRight.png',
|
|
1919
|
+
negativeX: this.getDfSt(['skyBox', 'nearTwo', 'negativeX']) || 'static/data/images/SkyBox/SunSetLeft.png',
|
|
1920
|
+
positiveY: this.getDfSt(['skyBox', 'nearTwo', 'positiveY']) || 'static/data/images/SkyBox/SunSetFront.png',
|
|
1921
|
+
negativeY: this.getDfSt(['skyBox', 'nearTwo', 'negativeY']) || 'static/data/images/SkyBox/SunSetBack.png',
|
|
1922
|
+
positiveZ: this.getDfSt(['skyBox', 'nearTwo', 'positiveZ']) || 'static/data/images/SkyBox/SunSetUp.png',
|
|
1923
|
+
negativeZ: this.getDfSt(['skyBox', 'nearTwo', 'negativeZ']) || 'static/data/images/SkyBox/SunSetDown.png'
|
|
1914
1924
|
}
|
|
1915
1925
|
});
|
|
1916
1926
|
},
|
|
@@ -1918,12 +1928,12 @@ Base.prototype = {
|
|
|
1918
1928
|
setThreeGroundSkyBox: function () {
|
|
1919
1929
|
return new Cesium$4.Scene.GroundSkyBox({
|
|
1920
1930
|
sources: {
|
|
1921
|
-
positiveX: 'static/data/images/SkyBox/Right.jpg',
|
|
1922
|
-
negativeX: 'static/data/images/SkyBox/Left.jpg',
|
|
1923
|
-
positiveY: 'static/data/images/SkyBox/Front.jpg',
|
|
1924
|
-
negativeY: 'static/data/images/SkyBox/Back.jpg',
|
|
1925
|
-
positiveZ: 'static/data/images/SkyBox/Up.jpg',
|
|
1926
|
-
negativeZ: 'static/data/images/SkyBox/Down.jpg'
|
|
1931
|
+
positiveX: this.getDfSt(['skyBox', 'nearThree', 'positiveX']) || 'static/data/images/SkyBox/Right.jpg',
|
|
1932
|
+
negativeX: this.getDfSt(['skyBox', 'nearThree', 'negativeX']) || 'static/data/images/SkyBox/Left.jpg',
|
|
1933
|
+
positiveY: this.getDfSt(['skyBox', 'nearThree', 'positiveY']) || 'static/data/images/SkyBox/Front.jpg',
|
|
1934
|
+
negativeY: this.getDfSt(['skyBox', 'nearThree', 'negativeY']) || 'static/data/images/SkyBox/Back.jpg',
|
|
1935
|
+
positiveZ: this.getDfSt(['skyBox', 'nearThree', 'positiveZ']) || 'static/data/images/SkyBox/Up.jpg',
|
|
1936
|
+
negativeZ: this.getDfSt(['skyBox', 'nearThree', 'negativeZ']) || 'static/data/images/SkyBox/Down.jpg'
|
|
1927
1937
|
}
|
|
1928
1938
|
});
|
|
1929
1939
|
},
|
|
@@ -3418,7 +3428,7 @@ let Cesium$6 = null;
|
|
|
3418
3428
|
* 图元拓展模块
|
|
3419
3429
|
* @param {*} viewer
|
|
3420
3430
|
*/
|
|
3421
|
-
function Primitive(viewer, cesiumGlobal) {
|
|
3431
|
+
function Primitive(viewer, cesiumGlobal, defaultStatic) {
|
|
3422
3432
|
if (viewer) {
|
|
3423
3433
|
this._viewer = viewer;
|
|
3424
3434
|
Cesium$6 = cesiumGlobal;
|
|
@@ -3478,7 +3488,8 @@ Primitive.prototype = {
|
|
|
3478
3488
|
Resource = Cesium$6.Resource,
|
|
3479
3489
|
Transforms = Cesium$6.Transforms,
|
|
3480
3490
|
defaultValue = Cesium$6.defaultValue,
|
|
3481
|
-
_viewer = this._viewer
|
|
3491
|
+
_viewer = this._viewer,
|
|
3492
|
+
defaultStatic = this.getDfSt(['primitive', 'TetrahedronPrimitive']) || 'static/data/images/Textures/fence.png';
|
|
3482
3493
|
const TetrahedronPrimitive = function (options) {
|
|
3483
3494
|
this.show = true;
|
|
3484
3495
|
this._command = undefined;
|
|
@@ -3494,7 +3505,7 @@ Primitive.prototype = {
|
|
|
3494
3505
|
this._color = defaultValue(options.color, new Color(1.0, 1.0, 0.0, 0.8));
|
|
3495
3506
|
this._scale = defaultValue(options.scale, new Cartesian3(10, 10, 15));
|
|
3496
3507
|
this._texture = undefined;
|
|
3497
|
-
this._imageUrl = buildModuleUrl(
|
|
3508
|
+
this._imageUrl = buildModuleUrl(defaultStatic);
|
|
3498
3509
|
this._modelMatrix = computeModelMatrix(this);
|
|
3499
3510
|
this._height = computeHeight(this);
|
|
3500
3511
|
createTexture(this);
|
|
@@ -4624,7 +4635,7 @@ Primitive.prototype = {
|
|
|
4624
4635
|
*/
|
|
4625
4636
|
const WaterPrimitive = function (opt) {
|
|
4626
4637
|
this._positions = opt.positions;
|
|
4627
|
-
this._url = opt.
|
|
4638
|
+
this._url = opt.img || this.getDfSt(['primitive', 'WaterPrimitive']) || 'static/data/images/Textures/waterNormals.jpg';
|
|
4628
4639
|
this._frequency = opt.frequency || 1000.0;
|
|
4629
4640
|
this._animationSpeed = opt.animationSpeed || 0.01;
|
|
4630
4641
|
this._amplitude = opt.amplitude || 10.0;
|
|
@@ -4972,7 +4983,7 @@ let Cesium$7 = null;
|
|
|
4972
4983
|
* 画笔模块
|
|
4973
4984
|
* @param {*} viewer
|
|
4974
4985
|
*/
|
|
4975
|
-
function Draw(viewer, cesiumGlobal) {
|
|
4986
|
+
function Draw(viewer, cesiumGlobal, defaultStatic) {
|
|
4976
4987
|
if (viewer) {
|
|
4977
4988
|
Cesium$7 = cesiumGlobal;
|
|
4978
4989
|
this._drawLayer = new Cesium$7.CustomDataSource('drawLayer');
|
|
@@ -4988,7 +4999,7 @@ Draw.prototype = {
|
|
|
4988
4999
|
drawPointGraphics: function (options) {
|
|
4989
5000
|
options = options || {};
|
|
4990
5001
|
options.style = options.style || {
|
|
4991
|
-
image: 'static/data/images/file/location4.png',
|
|
5002
|
+
image: this.getDfSt(['drawPointGraphics']) || 'static/data/images/file/location4.png',
|
|
4992
5003
|
width: 35,
|
|
4993
5004
|
height: 40,
|
|
4994
5005
|
clampToGround: true,
|
|
@@ -10719,7 +10730,7 @@ let Cesium$c = null;
|
|
|
10719
10730
|
* 外部插件模块
|
|
10720
10731
|
* @param {*} viewer
|
|
10721
10732
|
*/
|
|
10722
|
-
function Plugin(viewer, cesiumGlobal) {
|
|
10733
|
+
function Plugin(viewer, cesiumGlobal, defaultStatic) {
|
|
10723
10734
|
if (viewer) {
|
|
10724
10735
|
this._viewer = viewer;
|
|
10725
10736
|
Cesium$c = cesiumGlobal;
|
|
@@ -11231,7 +11242,7 @@ Plugin.prototype = {
|
|
|
11231
11242
|
semiMajorAxis: new Cesium$c.CallbackProperty(function () {
|
|
11232
11243
|
return s2;
|
|
11233
11244
|
}, false),
|
|
11234
|
-
material: "static/data/images/Textures/circle2.png",
|
|
11245
|
+
material: this.getDfSt(['plugin', 'Css3Renderer_one']) || "static/data/images/Textures/circle2.png",
|
|
11235
11246
|
rotation: new Cesium$c.CallbackProperty(function () {
|
|
11236
11247
|
rotation += 0.05;
|
|
11237
11248
|
return rotation;
|
|
@@ -11255,7 +11266,7 @@ Plugin.prototype = {
|
|
|
11255
11266
|
semiMajorAxis: new Cesium$c.CallbackProperty(function () {
|
|
11256
11267
|
return s4;
|
|
11257
11268
|
}, false),
|
|
11258
|
-
material: "static/data/images/Textures/circle1.png",
|
|
11269
|
+
material: this.getDfSt(['plugin', 'Css3Renderer_two']) || "static/data/images/Textures/circle1.png",
|
|
11259
11270
|
rotation: new Cesium$c.CallbackProperty(function () {
|
|
11260
11271
|
rotation2 -= 0.03;
|
|
11261
11272
|
return rotation2;
|
|
@@ -11441,7 +11452,7 @@ let Cesium$d = null;
|
|
|
11441
11452
|
* 分析模块
|
|
11442
11453
|
* @param {*} viewer
|
|
11443
11454
|
*/
|
|
11444
|
-
function Analysis(viewer, cesiumGlobal) {
|
|
11455
|
+
function Analysis(viewer, cesiumGlobal, defaultStatic) {
|
|
11445
11456
|
if (viewer) {
|
|
11446
11457
|
Cesium$d = cesiumGlobal;
|
|
11447
11458
|
this._analysisLayer = new Cesium$d.CustomDataSource('analysisLayer');
|
|
@@ -11539,8 +11550,8 @@ Analysis.prototype = {
|
|
|
11539
11550
|
var $this = this;
|
|
11540
11551
|
var _height = options.height || 30,
|
|
11541
11552
|
_splitNum = options.splitNum || 50,
|
|
11542
|
-
_wallImg = options.wallImg || 'static/data/images/file/excavate_side_min.jpg',
|
|
11543
|
-
_bottomImg = options.bottomImg || 'static/data/images/file/excavate_bottom_min.jpg';
|
|
11553
|
+
_wallImg = options.wallImg || this.getDfSt(['amalysis', 'createClipPlanAnalysis_wallImg']) || 'static/data/images/file/excavate_side_min.jpg',
|
|
11554
|
+
_bottomImg = options.bottomImg || this.getDfSt(['amalysis', 'createClipPlanAnalysis_bottomImg']) || 'static/data/images/file/excavate_bottom_min.jpg';
|
|
11544
11555
|
$this.drawPolygonGraphics({
|
|
11545
11556
|
callback: function (polygon, polygonObj) {
|
|
11546
11557
|
$this._drawLayer.entities.remove(polygonObj);
|
|
@@ -11569,7 +11580,8 @@ Analysis.prototype = {
|
|
|
11569
11580
|
var $this = this,
|
|
11570
11581
|
_maxH = options.maxH || 15,
|
|
11571
11582
|
_speed = options.speed || 1,
|
|
11572
|
-
_interval = options.interval || 10
|
|
11583
|
+
_interval = options.interval || 10,
|
|
11584
|
+
_matrialUrl = this.getDfSt(['amalysis', 'createSubmergedAnalysis']) || 'static/data/images/file/water.png';
|
|
11573
11585
|
$this.drawPolygonGraphics({
|
|
11574
11586
|
height: 1,
|
|
11575
11587
|
callback: function (polygon, polygonObj) {
|
|
@@ -11580,7 +11592,7 @@ Analysis.prototype = {
|
|
|
11580
11592
|
if (polygonObj) {
|
|
11581
11593
|
setTimeout(() => {
|
|
11582
11594
|
polygonObj.polygon.heightReference = 'CLAMP_TO_GROUND';
|
|
11583
|
-
polygonObj.polygon.material =
|
|
11595
|
+
polygonObj.polygon.material = _matrialUrl;
|
|
11584
11596
|
var h = 0.0;
|
|
11585
11597
|
polygonObj.polygon.extrudedHeight = h;
|
|
11586
11598
|
var st = setInterval(function () {
|
|
@@ -13543,21 +13555,21 @@ function getCatesian3FromPX$2(px, viewer) {
|
|
|
13543
13555
|
return cartesian;
|
|
13544
13556
|
}
|
|
13545
13557
|
|
|
13546
|
-
const prototypeExtends = function (viewer, cesiumGlobal) {
|
|
13558
|
+
const prototypeExtends = function (viewer, cesiumGlobal, defaultStatic) {
|
|
13547
13559
|
function _inner(parents, children) {
|
|
13548
13560
|
var curr = null;
|
|
13549
13561
|
if (Array.isArray(parents)) {
|
|
13550
13562
|
parents.forEach(pp => {
|
|
13551
13563
|
exeClone(pp);
|
|
13552
13564
|
});
|
|
13553
|
-
curr = new children(viewer, cesiumGlobal);
|
|
13565
|
+
curr = new children(viewer, cesiumGlobal, defaultStatic);
|
|
13554
13566
|
parents.forEach(pp => {
|
|
13555
|
-
pp.call(curr, viewer, cesiumGlobal);
|
|
13567
|
+
pp.call(curr, viewer, cesiumGlobal, defaultStatic);
|
|
13556
13568
|
});
|
|
13557
13569
|
} else {
|
|
13558
13570
|
exeClone(parents);
|
|
13559
|
-
curr = new children(viewer, cesiumGlobal);
|
|
13560
|
-
parents.call(curr, viewer, cesiumGlobal);
|
|
13571
|
+
curr = new children(viewer, cesiumGlobal, defaultStatic);
|
|
13572
|
+
parents.call(curr, viewer, cesiumGlobal, defaultStatic);
|
|
13561
13573
|
}
|
|
13562
13574
|
function exeClone(cloneTarget) {
|
|
13563
13575
|
//拷贝方法
|
|
@@ -13571,50 +13583,13 @@ const prototypeExtends = function (viewer, cesiumGlobal) {
|
|
|
13571
13583
|
}
|
|
13572
13584
|
return _inner;
|
|
13573
13585
|
};
|
|
13574
|
-
|
|
13575
|
-
/**
|
|
13576
|
-
* 初始化入口函数
|
|
13577
|
-
* @param {*} param0
|
|
13578
|
-
* {
|
|
13579
|
-
* cesiumGlobal:{Object} ceiusm全局对象
|
|
13580
|
-
* containerId:{String} 容器id
|
|
13581
|
-
* viewerConfig:{Object} viewer基础配置
|
|
13582
|
-
* 【参数格式】:{与官网一致}
|
|
13583
|
-
* extreaConfig:{Object }
|
|
13584
|
-
* 【参数格式】:
|
|
13585
|
-
* {
|
|
13586
|
-
* initNavigate:true,指南针,
|
|
13587
|
-
* logo:true,// 是否显示logo
|
|
13588
|
-
* depthTest:true, //开启深度检测
|
|
13589
|
-
* }
|
|
13590
|
-
* MapImageryList:{Array} 配置底图,每一个元素格式为
|
|
13591
|
-
* 【参数格式】 :
|
|
13592
|
-
* [{
|
|
13593
|
-
* id: 3,
|
|
13594
|
-
name: '',
|
|
13595
|
-
type: '',//ImageryProvider类型
|
|
13596
|
-
classConfig: {
|
|
13597
|
-
url: 链接地址
|
|
13598
|
-
},
|
|
13599
|
-
interfaceConfig: {},
|
|
13600
|
-
offset: '0,0',
|
|
13601
|
-
invertswitch: 0,
|
|
13602
|
-
filterRGB: '#ffffff',
|
|
13603
|
-
showswitch: 1,
|
|
13604
|
-
weight: 13,
|
|
13605
|
-
createtime: 创建时间
|
|
13606
|
-
updatetime: 更新时间,
|
|
13607
|
-
}]
|
|
13608
|
-
*
|
|
13609
|
-
* }
|
|
13610
|
-
* @returns
|
|
13611
|
-
*/
|
|
13612
13586
|
function initCesium({
|
|
13613
|
-
cesiumGlobal
|
|
13587
|
+
cesiumGlobal,
|
|
13614
13588
|
containerId,
|
|
13615
13589
|
viewerConfig = {},
|
|
13616
13590
|
extreaConfig = {},
|
|
13617
|
-
MapImageryList = []
|
|
13591
|
+
MapImageryList = [],
|
|
13592
|
+
defaultStatic
|
|
13618
13593
|
}) {
|
|
13619
13594
|
const initCom = new Controller(cesiumGlobal);
|
|
13620
13595
|
const _viewer = initCom.init({
|
|
@@ -13625,7 +13600,7 @@ function initCesium({
|
|
|
13625
13600
|
});
|
|
13626
13601
|
|
|
13627
13602
|
// 合并对象,实现继承
|
|
13628
|
-
const protoExtends = prototypeExtends(_viewer, cesiumGlobal);
|
|
13603
|
+
const protoExtends = prototypeExtends(_viewer, cesiumGlobal, defaultStatic);
|
|
13629
13604
|
// 初始化材质
|
|
13630
13605
|
const _material = protoExtends([Base, Shaders], Material);
|
|
13631
13606
|
const _graphics = protoExtends(Base, Graphics);
|