|
@@ -241,6 +241,9 @@ export default {
|
|
|
|
|
|
// 是否开启夜景
|
|
|
if (!isNight) {
|
|
|
+ if (this.dgdsq) {
|
|
|
+ clearTimeout(this.dgdsq);
|
|
|
+ }
|
|
|
if (scene.layers.find("白天")) scene.layers.find("白天").visible = true;
|
|
|
if (scene.layers.find("夜晚"))
|
|
|
scene.layers.find("夜晚").visible = false;
|
|
@@ -259,7 +262,7 @@ export default {
|
|
|
if (scene.layers.find("夜晚")) scene.layers.find("夜晚").visible = true;
|
|
|
// 泛光线底纹
|
|
|
let roadLine1 = Cesium.GeoJsonDataSource.load(
|
|
|
- window.NightLightUrl.csfgx
|
|
|
+ window.NightLightUrl.csfgx.url
|
|
|
);
|
|
|
|
|
|
roadLine1
|
|
@@ -272,16 +275,21 @@ export default {
|
|
|
line.polyline.material = new Cesium.PolylineGlowMaterialProperty({
|
|
|
//设置Glow材质
|
|
|
glowPower: 0.005,
|
|
|
- color: Cesium.Color.ORANGE.withAlpha(0.9),
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.csfgx.fgxColor.r,
|
|
|
+ window.NightLightUrl.csfgx.fgxColor.g,
|
|
|
+ window.NightLightUrl.csfgx.fgxColor.b,
|
|
|
+ window.NightLightUrl.csfgx.fgxColor.a
|
|
|
+ ),
|
|
|
});
|
|
|
- line.polyline.width = 50;
|
|
|
+ line.polyline.width = window.NightLightUrl.csfgx.fgxWidth;
|
|
|
}
|
|
|
})
|
|
|
.otherwise(function (error) {
|
|
|
window.alert(error);
|
|
|
});
|
|
|
let roadLine2 = Cesium.GeoJsonDataSource.load(
|
|
|
- window.NightLightUrl.csfgx
|
|
|
+ window.NightLightUrl.csfgx.url
|
|
|
);
|
|
|
//泛光亮线
|
|
|
roadLine2
|
|
@@ -294,17 +302,22 @@ export default {
|
|
|
line.polyline.material = new Cesium.PolylineGlowMaterialProperty({
|
|
|
//设置Glow材质
|
|
|
glowPower: 0.001,
|
|
|
- color: Cesium.Color.white,
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.csfgx.fgdxColor.r,
|
|
|
+ window.NightLightUrl.csfgx.fgdxColor.g,
|
|
|
+ window.NightLightUrl.csfgx.fgdxColor.b,
|
|
|
+ window.NightLightUrl.csfgx.fgdxColor.a
|
|
|
+ ),
|
|
|
});
|
|
|
- line.polyline.width = 5;
|
|
|
+ line.polyline.width = window.NightLightUrl.csfgx.fgdxWidth;
|
|
|
}
|
|
|
})
|
|
|
.otherwise(function (error) {
|
|
|
window.alert(error);
|
|
|
});
|
|
|
|
|
|
- //一山湖灯光
|
|
|
- Cesium.loadJson(window.NightLightUrl.yshdg).then((response) => {
|
|
|
+ //地标灯光
|
|
|
+ Cesium.loadJson(window.NightLightUrl.yshdg.url).then((response) => {
|
|
|
let features = response.features;
|
|
|
features.forEach((element) => {
|
|
|
let p = element.geometry.coordinates;
|
|
@@ -313,16 +326,21 @@ export default {
|
|
|
p[1],
|
|
|
p[2] + 20
|
|
|
);
|
|
|
- var SpotLightPos32 = new Cesium.Cartesian3.fromDegrees(
|
|
|
- p[0],
|
|
|
- p[1],
|
|
|
- p[2]
|
|
|
- );
|
|
|
+ // var SpotLightPos32 = new Cesium.Cartesian3.fromDegrees(
|
|
|
+ // p[0],
|
|
|
+ // p[1],
|
|
|
+ // p[2]
|
|
|
+ // );
|
|
|
var SpotLightOptions3 = {
|
|
|
- cutoffDistance: 120,
|
|
|
- color: Cesium.Color.ORANGE,
|
|
|
- decay: 1,
|
|
|
- intensity: 2,
|
|
|
+ cutoffDistance: window.NightLightUrl.yshdg.cutoffDistance,
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.yshdg.LightColor.r,
|
|
|
+ window.NightLightUrl.yshdg.LightColor.g,
|
|
|
+ window.NightLightUrl.yshdg.LightColor.b,
|
|
|
+ window.NightLightUrl.yshdg.LightColor.a
|
|
|
+ ),
|
|
|
+ decay: window.NightLightUrl.yshdg.decay,
|
|
|
+ intensity: window.NightLightUrl.yshdg.intensity,
|
|
|
};
|
|
|
|
|
|
let SpotLight33 = new Cesium.PointLight(
|
|
@@ -335,9 +353,9 @@ export default {
|
|
|
});
|
|
|
|
|
|
// 体育场灯光
|
|
|
- Cesium.loadJson(window.NightLightUrl.tycdg).then((response) => {
|
|
|
+ Cesium.loadJson(window.NightLightUrl.tycdg.url).then((response) => {
|
|
|
let features = response.features;
|
|
|
- features.forEach((element) => {
|
|
|
+ features.forEach((element, indx) => {
|
|
|
let p = element.geometry.coordinates;
|
|
|
var SpotLightPos3 = new Cesium.Cartesian3.fromDegrees(
|
|
|
p[0],
|
|
@@ -346,10 +364,15 @@ export default {
|
|
|
);
|
|
|
|
|
|
var SpotLightOptions3 = {
|
|
|
- cutoffDistance: 150,
|
|
|
- color: new Cesium.Color(245 / 255, 250 / 255, 216 / 255, 0.51),
|
|
|
- decay: 1,
|
|
|
- intensity: 1,
|
|
|
+ cutoffDistance: window.NightLightUrl.tycdg.cutoffDistance,
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.tycdg.LightColor.r,
|
|
|
+ window.NightLightUrl.tycdg.LightColor.g,
|
|
|
+ window.NightLightUrl.tycdg.LightColor.b,
|
|
|
+ window.NightLightUrl.tycdg.LightColor.a
|
|
|
+ ),
|
|
|
+ decay: window.NightLightUrl.tycdg.decay,
|
|
|
+ intensity: window.NightLightUrl.tycdg.intensity,
|
|
|
};
|
|
|
|
|
|
let SpotLight33 = new Cesium.PointLight(
|
|
@@ -357,24 +380,42 @@ export default {
|
|
|
// SpotLightPos32,
|
|
|
SpotLightOptions3
|
|
|
);
|
|
|
+ // that.tiyuchangdg.push(SpotLight33);
|
|
|
scene.addLightSource(SpotLight33);
|
|
|
+
|
|
|
+ // if (indx < 11) {
|
|
|
+ // that.tiyuchangdg1.push(SpotLight33);
|
|
|
+ // } else if (indx >= 11 && indx < 20) {
|
|
|
+ // that.tiyuchangdg2.push(SpotLight33);
|
|
|
+ // } else {
|
|
|
+ // that.tiyuchangdg3.push(SpotLight33);
|
|
|
+ // }
|
|
|
});
|
|
|
+ // let sd = that.splitArray(that.tiyuchangdg);
|
|
|
+ // that.tiyuchangdg1 = sd[0];
|
|
|
+ // that.tiyuchangdg2 = sd[1];
|
|
|
+ // that.tiyuchangdg3 = sd[2];
|
|
|
});
|
|
|
// // 道路灯光
|
|
|
- Cesium.loadJson(window.NightLightUrl.dldg).then((response) => {
|
|
|
+ Cesium.loadJson(window.NightLightUrl.dldg.url).then((response) => {
|
|
|
let features = response.features;
|
|
|
features.forEach((element) => {
|
|
|
let p = element.geometry.coordinates;
|
|
|
var SpotLightPos3 = new Cesium.Cartesian3.fromDegrees(
|
|
|
p[0],
|
|
|
p[1],
|
|
|
- p[2] + 20
|
|
|
+ p[2] + 40
|
|
|
);
|
|
|
var SpotLightOptions3 = {
|
|
|
- cutoffDistance: 110,
|
|
|
- color: new Cesium.Color(209 / 255, 209 / 255, 147 / 255, 0.5),
|
|
|
- decay: 1,
|
|
|
- intensity: 1,
|
|
|
+ cutoffDistance: window.NightLightUrl.dldg.cutoffDistance,
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.dldg.LightColor.r,
|
|
|
+ window.NightLightUrl.dldg.LightColor.g,
|
|
|
+ window.NightLightUrl.dldg.LightColor.b,
|
|
|
+ window.NightLightUrl.dldg.LightColor.a
|
|
|
+ ),
|
|
|
+ decay: window.NightLightUrl.dldg.decay,
|
|
|
+ intensity: window.NightLightUrl.dldg.intensity,
|
|
|
};
|
|
|
|
|
|
let SpotLight33 = new Cesium.PointLight(
|
|
@@ -386,7 +427,7 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
// 草坪灯光
|
|
|
- Cesium.loadJson(window.NightLightUrl.cpdg).then((response) => {
|
|
|
+ Cesium.loadJson(window.NightLightUrl.cpdg.url).then((response) => {
|
|
|
let features = response.features;
|
|
|
features.forEach((element) => {
|
|
|
let p = element.geometry.coordinates;
|
|
@@ -397,10 +438,15 @@ export default {
|
|
|
);
|
|
|
|
|
|
var SpotLightOptions3 = {
|
|
|
- cutoffDistance: 90,
|
|
|
- color: new Cesium.Color(209 / 255, 209 / 255, 147 / 255, 1),
|
|
|
- decay: 1,
|
|
|
- intensity: 1,
|
|
|
+ cutoffDistance: window.NightLightUrl.cpdg.cutoffDistance,
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.cpdg.LightColor.r,
|
|
|
+ window.NightLightUrl.cpdg.LightColor.g,
|
|
|
+ window.NightLightUrl.cpdg.LightColor.b,
|
|
|
+ window.NightLightUrl.cpdg.LightColor.a
|
|
|
+ ),
|
|
|
+ decay: window.NightLightUrl.cpdg.decay,
|
|
|
+ intensity: window.NightLightUrl.cpdg.intensity,
|
|
|
};
|
|
|
|
|
|
let SpotLight33 = new Cesium.PointLight(
|
|
@@ -426,6 +472,61 @@ export default {
|
|
|
this.gyTableData.forEach((element) => {
|
|
|
this.addLightSource(element);
|
|
|
});
|
|
|
+
|
|
|
+ if (this.dgdsq) {
|
|
|
+ clearTimeout(this.dgdsq);
|
|
|
+ }
|
|
|
+ this.dgdsq = setInterval(function () {
|
|
|
+ //创建分层设色对象 设置最大/最小可见高度 颜色表 显示模式 透明度及线宽
|
|
|
+ var colorTable = new Cesium.ColorTable();
|
|
|
+ if (that.tycindex == 0) {
|
|
|
+ colorTable.insert(
|
|
|
+ 65,
|
|
|
+ new Cesium.Color(255 / 255, 0 / 255, 234 / 255)
|
|
|
+ );
|
|
|
+ colorTable.insert(
|
|
|
+ 30,
|
|
|
+ new Cesium.Color(13 / 255, 255 / 255, 0 / 255)
|
|
|
+ );
|
|
|
+ } else if (that.tycindex == 1) {
|
|
|
+ colorTable.insert(
|
|
|
+ 65,
|
|
|
+ new Cesium.Color(255 / 255, 255 / 255, 0 / 255)
|
|
|
+ );
|
|
|
+ colorTable.insert(
|
|
|
+ 30,
|
|
|
+ new Cesium.Color(0 / 255, 232 / 255, 255 / 255)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ colorTable.insert(
|
|
|
+ 65,
|
|
|
+ new Cesium.Color(23 / 255, 0 / 255, 255 / 255)
|
|
|
+ );
|
|
|
+ colorTable.insert(
|
|
|
+ 30,
|
|
|
+ new Cesium.Color(155 / 255, 0 / 255, 255 / 255)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ var layer = scene.layers.find("TYCB@BaoPo0621N");
|
|
|
+ var hyp = new Cesium.HypsometricSetting();
|
|
|
+ hyp.MaxVisibleValue = 65;
|
|
|
+ hyp.MinVisibleValue = 30;
|
|
|
+ hyp.ColorTable = colorTable;
|
|
|
+ hyp.DisplayMode = Cesium.HypsometricSettingEnum.DisplayMode.FACE;
|
|
|
+ hyp.Opacity = 0.5;
|
|
|
+ hyp.LineInterval = 1.0;
|
|
|
+ //设置图层分层设色属性
|
|
|
+ layer.hypsometricSetting = {
|
|
|
+ hypsometricSetting: hyp,
|
|
|
+ // CoverageArea: ps,
|
|
|
+ analysisMode:
|
|
|
+ Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL,
|
|
|
+ };
|
|
|
+ that.tycindex += 1;
|
|
|
+ if (that.tycindex >= 3) {
|
|
|
+ that.tycindex = 0;
|
|
|
+ }
|
|
|
+ }, 1000 * 2);
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -696,7 +797,7 @@ export default {
|
|
|
*/
|
|
|
loadldx() {
|
|
|
let that = this;
|
|
|
- Cesium.loadJson(window.NightLightUrl.dlzxx).then((jsonData) => {
|
|
|
+ Cesium.loadJson(window.NightLightUrl.dlzxx.url).then((jsonData) => {
|
|
|
debugger;
|
|
|
jsonData.features.forEach((route) => {
|
|
|
let list = route.geometry.coordinates.flat(Infinity);
|
|
@@ -705,8 +806,13 @@ export default {
|
|
|
// 用于打底的线
|
|
|
polyline: {
|
|
|
positions: Cesium.Cartesian3.fromDegreesArrayHeights(list),
|
|
|
- width: 5, // 线的宽度,像素为单位
|
|
|
- material: Cesium.Color.BLACK.withAlpha(0.3),
|
|
|
+ width: window.NightLightUrl.dlzxx.lddxWidth, // 线的宽度,像素为单位
|
|
|
+ material: new Cesium.Color(
|
|
|
+ window.NightLightUrl.dlzxx.lddxColor.r,
|
|
|
+ window.NightLightUrl.dlzxx.lddxColor.g,
|
|
|
+ window.NightLightUrl.dlzxx.lddxColor.b,
|
|
|
+ window.NightLightUrl.dlzxx.lddxColor.a
|
|
|
+ ),
|
|
|
},
|
|
|
});
|
|
|
this.liudongGntities.push(dl);
|
|
@@ -714,13 +820,23 @@ export default {
|
|
|
id: route.properties.OBJECTID,
|
|
|
polyline: {
|
|
|
positions: Cesium.Cartesian3.fromDegreesArrayHeights(list),
|
|
|
- width: 4.0,
|
|
|
+ width: window.NightLightUrl.dlzxx.ldxWidth,
|
|
|
material: new Cesium.PolylineTrailMaterialProperty({
|
|
|
- outlineColor: Cesium.Color.WHITE,
|
|
|
- outlineWidth: 3,
|
|
|
- color: Cesium.Color.fromCssColorString("rgba(127, 255, 0, 1)"),
|
|
|
- trailLength: 0.3,
|
|
|
- period: 4.0,
|
|
|
+ outlineColor: new Cesium.Color(
|
|
|
+ window.NightLightUrl.dlzxx.ldxOutlineColor.r,
|
|
|
+ window.NightLightUrl.dlzxx.ldxOutlineColor.g,
|
|
|
+ window.NightLightUrl.dlzxx.ldxOutlineColor.b,
|
|
|
+ window.NightLightUrl.dlzxx.ldxOutlineColor.a
|
|
|
+ ),
|
|
|
+ outlineWidth: window.NightLightUrl.dlzxx.ldxOutlineWidth,
|
|
|
+ color: new Cesium.Color(
|
|
|
+ window.NightLightUrl.dlzxx.ldxColor.r,
|
|
|
+ window.NightLightUrl.dlzxx.ldxColor.g,
|
|
|
+ window.NightLightUrl.dlzxx.ldxColor.b,
|
|
|
+ window.NightLightUrl.dlzxx.ldxColor.a
|
|
|
+ ),
|
|
|
+ trailLength: window.NightLightUrl.dlzxx.trailLength,
|
|
|
+ period: window.NightLightUrl.dlzxx.period,
|
|
|
}),
|
|
|
},
|
|
|
});
|
|
@@ -728,317 +844,7 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- // //夜景开关
|
|
|
- // startNight(isNight) {
|
|
|
- // scene.globe.show = true;
|
|
|
- // viewer.scene.hdrEnabled = isNight;
|
|
|
- // viewer.scene.bloomEffect.show = false;
|
|
|
-
|
|
|
- // // 是否开启夜景
|
|
|
- // if (!isNight) {
|
|
|
- // scene.sun.show = true;
|
|
|
- // this.clearLightSource(true, true);
|
|
|
-
|
|
|
- // scene.skyAtmosphere.show = true;
|
|
|
-
|
|
|
- // this.switchLight(true); //白天
|
|
|
- // this.setHypsometric(false); //夜景材质
|
|
|
- // viewer.imageryLayers.remove(this.imageLayer);
|
|
|
- // } else {
|
|
|
- // this.switchLight(false);
|
|
|
- // scene.sun.show = false;
|
|
|
- // scene.skyAtmosphere.show = false;
|
|
|
-
|
|
|
- // this.setHypsometric(true); //夜景
|
|
|
- // this.imageLayer = viewer.imageryLayers.addImageryProvider(
|
|
|
- // new Cesium.SingleTileImageryProvider({
|
|
|
- // url: "static/images/zt/Nightscape/BlackMarble_2016-1.jpg",
|
|
|
- // })
|
|
|
- // );
|
|
|
- // this.imageLayer.alpha = 0.8;
|
|
|
- // this.gyTableData.forEach((element) => {
|
|
|
- // this.addLightSource(element);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- // //设置环境光
|
|
|
- // switchLight(isDayLight) {
|
|
|
- // if (isDayLight) {
|
|
|
- // //设置环境光(白天)
|
|
|
- // scene.lightSource.ambientLightColor = new Cesium.Color(
|
|
|
- // 0.65,
|
|
|
- // 0.65,
|
|
|
- // 0.65,
|
|
|
- // 1
|
|
|
- // );
|
|
|
- // } else {
|
|
|
- // // //设置环境光(夜晚)
|
|
|
- // // scene.lightSource.ambientLightColor = new Cesium.Color(
|
|
|
- // // 0.15,
|
|
|
- // // 0.15,
|
|
|
- // // 0.15,
|
|
|
- // // 1
|
|
|
- // // );
|
|
|
-
|
|
|
- // // // 添加光源
|
|
|
- // // let gyData1 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.49115721355469,
|
|
|
- // // 18.29592136116859,
|
|
|
- // // 80
|
|
|
- // // ),
|
|
|
- // // gyDecay: 1,
|
|
|
- // // gyDistance: 800,
|
|
|
- // // gyColor: "rgba(255,20,147,0.37)",
|
|
|
- // // gyIntensity: 2,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData1);
|
|
|
-
|
|
|
- // // //主建筑光源
|
|
|
- // // let gyData2 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.55348802331464,
|
|
|
- // // 18.278824564764143,
|
|
|
- // // 80
|
|
|
- // // ),
|
|
|
- // // gyDecay: 1,
|
|
|
- // // gyDistance: 800,
|
|
|
- // // gyColor: "rgba(240,248,255,1)",
|
|
|
- // // gyIntensity: 1,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData2);
|
|
|
- // // let gyData3 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.54991809813524,
|
|
|
- // // 18.28458792962873,
|
|
|
- // // 80
|
|
|
- // // ),
|
|
|
- // // gyDecay: 1,
|
|
|
- // // gyDistance: 800,
|
|
|
- // // gyColor: "rgba(240,248,255,1)",
|
|
|
- // // gyIntensity: 1,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData3);
|
|
|
-
|
|
|
- // // let gyData4 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.5490688547866,
|
|
|
- // // 18.283227701313386,
|
|
|
- // // 40
|
|
|
- // // ),
|
|
|
- // // gyDecay: 2,
|
|
|
- // // gyDistance: 80,
|
|
|
- // // gyColor: "rgba(13,128,247,0.15)",
|
|
|
- // // gyIntensity: 0.5,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData4);
|
|
|
- // // let gyData5 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.55236475164054,
|
|
|
- // // 18.278884181031398,
|
|
|
- // // 40
|
|
|
- // // ),
|
|
|
- // // gyDecay: 2,
|
|
|
- // // gyDistance: 80,
|
|
|
- // // gyColor: "rgba(13,128,247,0.15)",
|
|
|
- // // gyIntensity: 0.5,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData5);
|
|
|
- // // let gyData6 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.55195212379788,
|
|
|
- // // 18.283303465199854,
|
|
|
- // // 40
|
|
|
- // // ),
|
|
|
- // // gyDecay: 2,
|
|
|
- // // gyDistance: 80,
|
|
|
- // // gyColor: "rgba(13,128,247,0.15)",
|
|
|
- // // gyIntensity: 0.5,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData6);
|
|
|
- // // let gyData7 = {
|
|
|
- // // gyType: "点光源",
|
|
|
- // // cartesian: new Cesium.Cartesian3.fromDegrees(
|
|
|
- // // 109.55549715519659,
|
|
|
- // // 18.279573531714174,
|
|
|
- // // 40
|
|
|
- // // ),
|
|
|
- // // gyDecay: 2,
|
|
|
- // // gyDistance: 80,
|
|
|
- // // gyColor: "rgba(13,128,247,0.15)",
|
|
|
- // // gyIntensity: 0.5,
|
|
|
- // // };
|
|
|
- // // this.addLightSource(gyData7);
|
|
|
- // // 添加光源
|
|
|
- // // 新增直射光1--西南侧光
|
|
|
- // var position = new Cesium.Cartesian3.fromDegrees(
|
|
|
- // 108.64028472779978,
|
|
|
- // 17.253899597841926,
|
|
|
- // 10
|
|
|
- // );
|
|
|
- // var targetPosition1 = new Cesium.Cartesian3.fromDegrees(
|
|
|
- // 108.98714556856183,
|
|
|
- // 17.660729210061046,
|
|
|
- // 10
|
|
|
- // );
|
|
|
- // var dirLightOptions = {
|
|
|
- // targetPosition: targetPosition1,
|
|
|
- // color: new Cesium.Color(220 / 255, 230 / 255, 240 / 255, 0.5),
|
|
|
- // intensity: 1,
|
|
|
- // };
|
|
|
- // this.directionalLight_1 &&
|
|
|
- // scene.removeLightSource(this.directionalLight_1);
|
|
|
- // this.directionalLight_1 = new Cesium.DirectionalLight(
|
|
|
- // position,
|
|
|
- // dirLightOptions
|
|
|
- // );
|
|
|
- // scene.addLightSource(this.directionalLight_1);
|
|
|
-
|
|
|
- // //新增直射光1--东北侧光
|
|
|
- // var position3 = new Cesium.Cartesian3.fromDegrees(
|
|
|
- // 110.1833740842942,
|
|
|
- // 19.23480287256715,
|
|
|
- // 10
|
|
|
- // );
|
|
|
- // var targetPosition3 = new Cesium.Cartesian3.fromDegrees(
|
|
|
- // 109.92243671490641,
|
|
|
- // 18.823627245617516,
|
|
|
- // 10
|
|
|
- // );
|
|
|
- // var dirLightOptions3 = {
|
|
|
- // targetPosition: targetPosition3,
|
|
|
- // color: new Cesium.Color(220 / 255, 223 / 255, 227 / 255, 0.5),
|
|
|
- // intensity: 1.5,
|
|
|
- // };
|
|
|
- // this.directionalLight_3 &&
|
|
|
- // scene.removeLightSource(this.directionalLight_3);
|
|
|
- // this.directionalLight_3 = new Cesium.DirectionalLight(
|
|
|
- // position3,
|
|
|
- // dirLightOptions3
|
|
|
- // );
|
|
|
- // scene.addLightSource(this.directionalLight_3);
|
|
|
- // //新增直射光1--顶光
|
|
|
- // var position4 = new Cesium.Cartesian3.fromDegrees(
|
|
|
- // 109.5264539133307,
|
|
|
- // 18.2736162462657,
|
|
|
- // 500
|
|
|
- // );
|
|
|
- // var targetPosition4 = new Cesium.Cartesian3.fromDegrees(
|
|
|
- // 109.5264539133307,
|
|
|
- // 18.2736162462657,
|
|
|
- // 400
|
|
|
- // );
|
|
|
- // var dirLightOptions4 = {
|
|
|
- // targetPosition: targetPosition4,
|
|
|
-
|
|
|
- // color: Cesium.Color.SILVER.withAlpha(0.5),
|
|
|
- // intensity: 0.1,
|
|
|
- // };
|
|
|
- // this.directionalLight_4 &&
|
|
|
- // scene.removeLightSource(this.directionalLight_4);
|
|
|
- // this.directionalLight_4 = new Cesium.DirectionalLight(
|
|
|
- // position4,
|
|
|
- // dirLightOptions4
|
|
|
- // );
|
|
|
- // scene.addLightSource(this.directionalLight_4);
|
|
|
- // }
|
|
|
- // },
|
|
|
- // //设置白膜自发光纹理
|
|
|
- // setHypsometric(isShow = true) {
|
|
|
- // if (isShow) {
|
|
|
- // scene.layers.layerQueue.forEach((layer) => {
|
|
|
- // let hyp = null;
|
|
|
- // let LayerName = window.NightViewLayerName.find(
|
|
|
- // (c) => c == layer.name
|
|
|
- // );
|
|
|
- // if (LayerName) {
|
|
|
- // // 关掉边框线
|
|
|
- // layer.style3D.fillStyle = Cesium.FillStyle.Fill;
|
|
|
- // hyp = new Cesium.HypsometricSetting();
|
|
|
- // hyp.emissionTextureArray = [
|
|
|
- // {
|
|
|
- // url: "static/images/zt/Nightscape/Texture05.jpg",
|
|
|
- // USpeed: 0.5,
|
|
|
- // VSpeed: 0,
|
|
|
- // UTiling: 1,
|
|
|
- // VTiling: 1,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // url: "static/images/zt/Nightscape/Texture01.jpg",
|
|
|
- // USpeed: 0.5,
|
|
|
- // VSpeed: 0,
|
|
|
- // UTiling: 1,
|
|
|
- // VTiling: 1,
|
|
|
- // },
|
|
|
-
|
|
|
- // {
|
|
|
- // url: "static/images/zt/Nightscape/build008.JPG",
|
|
|
- // USpeed: 0,
|
|
|
- // VSpeed: 0,
|
|
|
- // UTiling: 1,
|
|
|
- // VTiling: 3,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // url: "static/images/zt/Nightscape/build129.JPG",
|
|
|
- // USpeed: 0,
|
|
|
- // VSpeed: 0,
|
|
|
- // UTiling: 1,
|
|
|
- // VTiling: 3,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // url: "static/images/zt/Nightscape/build216.JPG",
|
|
|
- // USpeed: 0,
|
|
|
- // VSpeed: 0,
|
|
|
- // UTiling: 1,
|
|
|
- // VTiling: 3,
|
|
|
- // },
|
|
|
- // // {
|
|
|
- // // url: "static/images/zt/Nightscape/HighRiseNight0008_4_S.jpg",
|
|
|
- // // USpeed: 0,
|
|
|
- // // VSpeed: 0,
|
|
|
- // // UTiling: 1,
|
|
|
- // // VTiling: 1,
|
|
|
- // // },
|
|
|
- // // {
|
|
|
- // // url: "static/images/zt/Nightscape/HighRiseNight0016_3_L.jpg",
|
|
|
- // // USpeed: 0,
|
|
|
- // // VSpeed: 0,
|
|
|
- // // UTiling: 1,
|
|
|
- // // VTiling: 1,
|
|
|
- // // },
|
|
|
- // // {
|
|
|
- // // url: "static/images/zt/Nightscape/HighRiseNight0020_L.jpg",
|
|
|
- // // USpeed: 0,
|
|
|
- // // VSpeed: 0,
|
|
|
- // // UTiling: 1,
|
|
|
- // // VTiling: 1,
|
|
|
- // // },
|
|
|
- // ];
|
|
|
- // layer.hypsometricSetting = {
|
|
|
- // hypsometricSetting: hyp,
|
|
|
- // };
|
|
|
- // }
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // scene.layers.layerQueue.forEach((layer) => {
|
|
|
- // layer.hypsometricSetting = {
|
|
|
- // hypsometricSetting: undefined,
|
|
|
- // };
|
|
|
- // layer.style3D.fillStyle = Cesium.FillStyle.Fill;
|
|
|
- // // 刷新场景
|
|
|
- // // layer.refresh();
|
|
|
- // });
|
|
|
- // }
|
|
|
- // },
|
|
|
|
|
|
- //提交光源数据
|
|
|
onSubmit() {
|
|
|
//更新
|
|
|
if (this.dgyform.id) {
|