From 85bcf0300cfbdfbd518e380b8f8dc09445e0c1f8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 05 Jun 2021 14:50:12 +0800
Subject: [PATCH] 部分接口的端口更换,卷帘对比的核对,完善卷帘对比功能
---
config.json | 6
widgets/Query/Widget.js | 2
widgets/Location/Widget_copy.js | 6
widgets/Rolling/Widget copy.js | 2
widgets/Layermanagement/datas.json | 6
widgets/Location/Widget_copy2.js | 6
widgets/Rolling/css/style.css | 22 ++--
widgets/visualAngle/Widget.js | 25 +++++
widgets/Location/Widget.js | 6
widgets/Location/CommonPointLayer3D.js | 4
widgets/Rolling/Widget.html | 2
widgets/Marker/Widget.js | 2
widgets/Rolling/Widget.js | 199 ++++++++++++++++-----------------------
13 files changed, 141 insertions(+), 147 deletions(-)
diff --git a/config.json b/config.json
index 2c12c7f..97eb84e 100644
--- a/config.json
+++ b/config.json
@@ -105,7 +105,7 @@
"position": {
"right": 10,
"top": 96,
- "width": "400px",
+ "width": "472px",
"height": "50px",
"relativeTo": "map"
}
@@ -181,8 +181,8 @@
}
},
"map": {
- "3D": true,
- "2D": false,
+ "3D": false,
+ "2D": true,
"position": {
"left": 0,
"top": 0,
diff --git a/widgets/Layermanagement/datas.json b/widgets/Layermanagement/datas.json
index 68b80e2..da5843b 100644
--- a/widgets/Layermanagement/datas.json
+++ b/widgets/Layermanagement/datas.json
@@ -3,7 +3,7 @@
{
"date": "2020-09-12 08:53:28",
"hasChildren": true,
- "icon": "http://www.sw797.com:801/gzsw3D/v2/images/icon/mrtc.png",
+ "icon": "http://www.sw797.com:10011/gzsw3D/v2/images/icon/mrtc.png",
"id": "1",
"isCheck": "1",
"isDisable": "1",
@@ -66,7 +66,7 @@
{
"date": "2020-09-12 08:53:28",
"hasChildren": true,
- "icon": "http://www.sw797.com:801/gzsw3D/v2/images/icon/mrtc.png",
+ "icon": "http://www.sw797.com:10011/gzsw3D/v2/images/icon/mrtc.png",
"id": "5",
"isCheck": "1",
"isDisable": "1",
@@ -144,7 +144,7 @@
},{
"date": "2020-09-12 08:53:28",
"hasChildren": true,
- "icon": "http://www.sw797.com:801/gzsw3D/v2/images/icon/mrtc.png",
+ "icon": "http://www.sw797.com:10011/gzsw3D/v2/images/icon/mrtc.png",
"id": "9",
"isCheck": "1",
"isDisable": "1",
diff --git a/widgets/Location/CommonPointLayer3D.js b/widgets/Location/CommonPointLayer3D.js
index 43a7fcf..19c1de7 100644
--- a/widgets/Location/CommonPointLayer3D.js
+++ b/widgets/Location/CommonPointLayer3D.js
@@ -153,7 +153,7 @@
} else if (txt == "水质站") {
// 与实体相关的图片
billbo = {
- image: 'http://www.sw797.com:801/gzsw3D/v2/images/icon/szz.png',
+ image: 'http://www.sw797.com:10011/gzsw3D/v2/images/icon/szz.png',
pixelOffset: new Cesium.Cartesian2(0, 0),
width: 16,
height: 16,
@@ -179,7 +179,7 @@
} else if (txt == "中小河流站") {
// 与实体相关的图片
billbo = {
- image: 'http://www.sw797.com:801/gzsw3D/v2/images/icon/zxhlz.png',
+ image: 'http://www.sw797.com:10011/gzsw3D/v2/images/icon/zxhlz.png',
pixelOffset: new Cesium.Cartesian2(0, 0),
width: 16,
height: 16,
diff --git a/widgets/Location/Widget.js b/widgets/Location/Widget.js
index bb97e0b..0d5245d 100644
--- a/widgets/Location/Widget.js
+++ b/widgets/Location/Widget.js
@@ -511,7 +511,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + "</div>";
$("#loc-tab1-grid").append(div);
}
@@ -523,7 +523,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div id='location-lb' class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' + "</div>";
$("#loc-tab2-grid").append(div);
}
@@ -535,7 +535,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div id='location-lb' class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' + '<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、村'] + '</div>' + "</div>";
$("#loc-tab3-grid").append(div);
}
diff --git a/widgets/Location/Widget_copy.js b/widgets/Location/Widget_copy.js
index a3541cb..2d2166d 100644
--- a/widgets/Location/Widget_copy.js
+++ b/widgets/Location/Widget_copy.js
@@ -525,7 +525,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' +
'<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' +
'<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' +
@@ -540,7 +540,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div id='location-lb' class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' +
'<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' +
'<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' +
@@ -556,7 +556,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div id='location-lb' class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' +
'<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' +
'<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、村'] + '</div>' +
diff --git a/widgets/Location/Widget_copy2.js b/widgets/Location/Widget_copy2.js
index 130fa66..c0bfe61 100644
--- a/widgets/Location/Widget_copy2.js
+++ b/widgets/Location/Widget_copy2.js
@@ -603,7 +603,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' +
'<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' +
'<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' +
@@ -618,7 +618,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div id='location-lb' class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' +
'<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' +
'<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、'] + '</div>' +
@@ -634,7 +634,7 @@
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
var div = "<div id='location-lb' class='location-lb'>" +
- //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:801/gzsw3D/v2/images/icon/swenz.png>'+
+ //'<img style="width: 20px;height: 20px" src=http://www.sw797.com:10011/gzsw3D/v2/images/icon/swenz.png>'+
'<a>' + (i + 1 + this.DWindex) + '、' + data[i].STNM + '</a>' + ' (' + data[i].STCD + ')' +
'<div class=location-zb><lable>流域:</lable>' + data[i]['流域'] + '</div>' +
'<div class=location-zb><lable>所在乡镇:</lable>' + data[i]['所在乡镇、村'] + '</div>' +
diff --git a/widgets/Marker/Widget.js b/widgets/Marker/Widget.js
index cdb5c65..e416c74 100644
--- a/widgets/Marker/Widget.js
+++ b/widgets/Marker/Widget.js
@@ -220,7 +220,7 @@
offset: '70px',
maxmin: true, //开启最大化最小化按钮
area: ['100%', 'calc(100% - 70px)'],
- content: 'http://www.sw797.com:801/gzsw3D/views/water/River_Len.html'
+ content: 'http://www.sw797.com:10011/gzsw3D/views/water/River_Len.html'
});
}));
diff --git a/widgets/Query/Widget.js b/widgets/Query/Widget.js
index 73d99b4..9de7a99 100644
--- a/widgets/Query/Widget.js
+++ b/widgets/Query/Widget.js
@@ -26,7 +26,7 @@
onOpen: function() {
//面板打开的时候触发 (when open this panel trigger)
- parent.open('http://www.sw797.com:801/gzapp/#monitorduty')
+ parent.open('http://www.sw797.com:10011/gzapp/#monitorduty')
},
onClose: function() {
diff --git a/widgets/Rolling/Widget copy.js b/widgets/Rolling/Widget copy.js
index 89efe9e..f78ce93 100644
--- a/widgets/Rolling/Widget copy.js
+++ b/widgets/Rolling/Widget copy.js
@@ -45,7 +45,7 @@
{
"label": "赣州市离线影像",
"type": "url",
- "url": "http://www.sw797.com:801/gzsw3D/v2/data/wp/{z}/{x}/{y}.png"
+ "url": "http://www.sw797.com:10011/gzsw3D/v2/data/wp/{z}/{x}/{y}.png"
}
]
},
diff --git a/widgets/Rolling/Widget.html b/widgets/Rolling/Widget.html
index 9af813d..d5af37f 100644
--- a/widgets/Rolling/Widget.html
+++ b/widgets/Rolling/Widget.html
@@ -3,8 +3,8 @@
<div class="hezi-left-select">
<span class="hezi-leftspan" id="gaibian">左侧图层 :</span>
<select class="hezi-select" id="hezi-selectLeft">
- <option class="optionVal2" value="2">天地图矢量</option>
<option class="optionVal1" value="1">天地图影像</option>
+ <option class="optionVal2" value="2">天地图矢量</option>
</select>
</div>
<div class="hezi-right-select">
diff --git a/widgets/Rolling/Widget.js b/widgets/Rolling/Widget.js
index c9f9b9b..ec040f5 100644
--- a/widgets/Rolling/Widget.js
+++ b/widgets/Rolling/Widget.js
@@ -1,11 +1,11 @@
define([
- 'dojo/_base/declare',
- 'dojo/_base/lang',
- 'dojo/_base/array',
- 'dojo/_base/html',
- 'dojo/topic',
- 'jimu/BaseWidget',
-],
+ 'dojo/_base/declare',
+ 'dojo/_base/lang',
+ 'dojo/_base/array',
+ 'dojo/_base/html',
+ 'dojo/topic',
+ 'jimu/BaseWidget',
+ ],
function (declare,
lang,
array,
@@ -37,12 +37,6 @@
"tileMatrixSetID": "w",
"maximumLevel": 17
}],
- // 赣州地图
- imageryProviderArrUrl: [{
- "label": "赣州市离线影像",
- "type": "url",
- "url": "http://www.sw797.com:801/gzsw3D/v2/data/wp/{z}/{x}/{y}.png"
- }],
// 天地图电子
imageryProviderDian: [{
"label": "天地图矢量",
@@ -67,57 +61,44 @@
earthAtNightRight: '',
zjLeft: 0,
zjRight: '',
+
tiandituLeft: '',
tiandituZJLeft: '',
tiandituRight: '',
tiandituZJRight: '',
- ganZhouYinLeft: '',
- ganZhouYinRight: '',
+
startup: function () {
topic.subscribe("openRolling", lang.hitch(this, this.openRolling));
var that = this;
// 点击卷帘关闭面板
$('.rollinng-table-hezi-xx').click(function () {
+
that.map.imageryLayers.remove(that.earthAtNightLeft);
- that.map.imageryLayers.remove(that.earthAtNightRight);
that.map.imageryLayers.remove(that.zjLeft);
+
+ that.map.imageryLayers.remove(that.earthAtNightRight);
that.map.imageryLayers.remove(that.zjRight);
+
+
that.map.imageryLayers.remove(that.tiandituLeft);
that.map.imageryLayers.remove(that.tiandituZJLeft);
+
that.map.imageryLayers.remove(that.tiandituRight);
that.map.imageryLayers.remove(that.tiandituZJRight);
- that.map.imageryLayers.remove(that.ganZhouYinLeft);
- that.map.imageryLayers.remove(that.ganZhouYinRight);
+
$('.jimu-widget-Rolling').hide();
- $('#hezi-selectLeft').val(2);
- $('#hezi-selectRight').val(3);
+
});
// 加载左边图层
$('#hezi-selectLeft').on('change', function () {
// 将滑块的位置与拆分位置同步
var slider = document.getElementById('slider');
- that.map.scene.imagerySplitPosition = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
+ that.map.scene.imagerySplitPosition.x = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
if ($(this).val() == 2) {
- // viewer.imageryLayers.remove(that.tiandituLeft);
- // viewer.imageryLayers.remove(that.tiandituZJLeft);
- viewer.imageryLayers.remove(that.ganZhouYinLeft);
+ loadMapTianLeft();
+ } else if ($(this).val() == 1) {
loadMapLeft();
- that.earthAtNightLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT;
- that.zjLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT;
- }
- else if ($(this).val() == 1) {
- viewer.imageryLayers.remove(that.earthAtNightLeft);
- viewer.imageryLayers.remove(that.zjLeft);
- // viewer.imageryLayers.remove(that.tiandituLeft);
- // viewer.imageryLayers.remove(that.tiandituZJLeft);
- loadMapGzLeft();
- that.ganZhouYinLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT;
- }
- else {
- viewer.imageryLayers.remove(that.earthAtNightLeft);
- viewer.imageryLayers.remove(that.zjLeft);
- viewer.imageryLayers.remove(that.ganZhouYinLeft);
}
});
@@ -126,135 +107,115 @@
// debugger
// 将滑块的位置与拆分位置同步
var slider = document.getElementById('slider');
- that.map.scene.imagerySplitPosition = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
+ that.map.scene.imagerySplitPosition.x = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
if ($(this).val() == 2) {
// loadMap(that.earthAtNightRight, that.zjRight);
- viewer.imageryLayers.remove(that.tiandituRight);
- viewer.imageryLayers.remove(that.tiandituZJRight);
loadMapRight();
- that.earthAtNightRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT;
- that.zjRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT;
- }
- else if ($(this).val() == 3) {
- viewer.imageryLayers.remove(that.earthAtNightRight);
- viewer.imageryLayers.remove(that.zjRight);
+ } else if ($(this).val() == 1) {
loadMapTianRight();
- that.tiandituRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT;
- that.tiandituZJRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT;
- }
- else {
- viewer.imageryLayers.remove(that.earthAtNightRight);
- viewer.imageryLayers.remove(that.zjRight);
- loadMapGzRight();
- that.ganZhouYinRight.splitDirection = Cesium.ImagerySplitDirection.RIGHT;
- // viewer.imageryLayers.remove(that.tiandituRight);
- // viewer.imageryLayers.remove(that.tiandituZJRight);
- }
+ }
});
-
// 加载左边天地图影像图层方法
function loadMapLeft() {
+ that.map.imageryLayers.remove(that.tiandituLeft);
+ that.map.imageryLayers.remove(that.tiandituZJLeft);
//imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = viewer.imageryLayers;
//addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中
- that.earthAtNightLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.earthAtNightLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderAdd[0]
));
- that.zjLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.zjLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderAdd[1]
));
- }
- // 加载左边赣州影像图层方法
- function loadMapGzLeft() {
- //imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = viewer.imageryLayers;
- //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 UrlTemplateImageryProvider
- that.ganZhouYinLeft = layers.addImageryProvider(new Cesium.UrlTemplateImageryProvider(
- that.imageryProviderArrUrl[0]
- ));
+ that.earthAtNightLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
+ that.zjLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
}
// 加载左边天地图电子图层方法
function loadMapTianLeft() {
+ that.map.imageryLayers.remove(that.earthAtNightLeft);
+ that.map.imageryLayers.remove(that.zjLeft);
//imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = viewer.imageryLayers;
//addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中
- that.tiandituLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.tiandituLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderDian[0]
));
- that.tiandituZJLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.tiandituZJLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderDian[1]
));
+
+ that.tiandituLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
+ that.tiandituZJLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
}
+
// 加载右边天地图影像图层方法
function loadMapRight() {
+ that.map.imageryLayers.remove(that.tiandituRight);
+ that.map.imageryLayers.remove(that.tiandituZJRight);
//imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = viewer.imageryLayers;
//addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中
- that.earthAtNightRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.earthAtNightRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderAdd[0]
));
- that.zjRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.zjRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderAdd[1]
));
+ that.earthAtNightRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
+ that.zjRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
}
// 加载右边天地图电子图层方法
function loadMapTianRight() {
+ that.map.imageryLayers.remove(that.earthAtNightRight);
+ that.map.imageryLayers.remove(that.zjRight);
//imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = viewer.imageryLayers;
//addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中
- that.tiandituRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.tiandituRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderDian[0]
));
- that.tiandituZJRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.tiandituZJRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderDian[1]
));
+ that.tiandituRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
+ that.tiandituZJRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
}
- // 加载右边赣州影像图层方法
- function loadMapGzRight() {
- //imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = viewer.imageryLayers;
- //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 UrlTemplateImageryProvider
- that.ganZhouYinRight = layers.addImageryProvider(new Cesium.UrlTemplateImageryProvider(
- that.imageryProviderArrUrl[0]
- ));
- }
var handler = new Cesium.ScreenSpaceEventHandler(slider);
var moveActive = false;
+
function move(movement) {
if (!moveActive) {
return;
}
var relativeOffset = movement.endPosition.x;
+
// 将滑块的位置与拆分位置同步
- viewer.scene.imagerySplitPosition = (slider.offsetLeft + relativeOffset - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
- slider.style.left = 100.0 * + (slider.offsetLeft + relativeOffset) / (slider.parentElement.offsetWidth) + '%';
+ that.map.scene.imagerySplitPosition.x = (slider.offsetLeft + relativeOffset - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
+ slider.style.left = 100.0 * +(slider.offsetLeft + relativeOffset) / (slider.parentElement.offsetWidth) + '%';
+
}
-
handler.setInputAction(function () {
moveActive = true;
- }, Cesium.ScreenSpaceEventType.LEFT_DOWN);//左键按下事件
+ }, Cesium.ScreenSpaceEventType.LEFT_DOWN); //左键按下事件
handler.setInputAction(function () {
moveActive = true;
- }, Cesium.ScreenSpaceEventType.PINCH_START);//触摸表面上双指事件的开始
+ }, Cesium.ScreenSpaceEventType.PINCH_START); //触摸表面上双指事件的开始
- handler.setInputAction(move, Cesium.ScreenSpaceEventType.MOUSE_MOVE);//鼠标移动事件
- handler.setInputAction(move, Cesium.ScreenSpaceEventType.PINCH_MOVE);//触摸表面上双指移动事件
+ handler.setInputAction(move, Cesium.ScreenSpaceEventType.MOUSE_MOVE); //鼠标移动事件
+ handler.setInputAction(move, Cesium.ScreenSpaceEventType.PINCH_MOVE); //触摸表面上双指移动事件
handler.setInputAction(function () {
moveActive = false;
- }, Cesium.ScreenSpaceEventType.LEFT_UP);//鼠标左键抬起事件
+ }, Cesium.ScreenSpaceEventType.LEFT_UP); //鼠标左键抬起事件
handler.setInputAction(function () {
moveActive = false;
- }, Cesium.ScreenSpaceEventType.PINCH_END);//触摸表面上的双指事件的结束
+ }, Cesium.ScreenSpaceEventType.PINCH_END); //触摸表面上的双指事件的结束
},
openRolling: function (item) {
@@ -268,23 +229,31 @@
var that = this;
if (this.flag != true) return;
var slider = document.getElementById('slider');
- that.map.scene.imagerySplitPosition = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
- that.map.scene.imagerySplitPosition = 0.5;
- loadMapLeft();
- that.earthAtNightLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT;
- that.zjLeft.splitDirection = Cesium.ImagerySplitDirection.LEFT;
+ that.map.scene.imagerySplitPosition.x = (slider.offsetLeft - slider.parentElement.offsetWidth) / (slider.parentElement.offsetWidth);
+ that.map.scene.imagerySplitPosition.x = 0.5;
- function loadMapLeft() {
- //imageryLayers获取将在地球上渲染的图像图层的集合
- var layers = that.map.imageryLayers;
- //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中
- that.earthAtNightLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
- that.imageryProviderAdd[0]
- ));
- that.zjLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
- that.imageryProviderAdd[1]
- ));
- }
+
+
+ that.earthAtNightLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.imageryProviderAdd[0]
+ ));
+ that.zjLeft = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.imageryProviderAdd[1]
+ ));
+
+ that.earthAtNightLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
+ that.zjLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
+
+
+ that.tiandituRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.imageryProviderDian[0]
+ ));
+ that.tiandituZJRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
+ that.imageryProviderDian[1]
+ ));
+
+ that.tiandituRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
+ that.tiandituZJRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
},
diff --git a/widgets/Rolling/css/style.css b/widgets/Rolling/css/style.css
index 48fb381..ca89f3e 100644
--- a/widgets/Rolling/css/style.css
+++ b/widgets/Rolling/css/style.css
@@ -13,28 +13,28 @@
display: none;
}
-.rollinng-table-hezi {
+.jimu-widget-Rolling .rollinng-table-hezi {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 15px;
}
-.hezi-left-select {
+.jimu-widget-Rolling .hezi-left-select {
line-height: 50px;
}
-.hezi-right-select {
+.jimu-widget-Rolling .hezi-right-select {
height: 32px;
}
-.hezi-leftspan, .hezi-rightspan {
+.jimu-widget-Rolling .hezi-leftspan, .hezi-rightspan {
font-size: 14px;
color: #fff;
margin-right: 7px;
}
-.hezi-select {
+.jimu-widget-Rolling .hezi-select {
background-color: #404853;
color: #fff;
padding: 5px;
@@ -44,23 +44,23 @@
-.hezi-select:hover {
+.jimu-widget-Rolling .hezi-select:hover {
background-color: #ccc;
color: #3c464b;
}
-.rollinng-table-hezi-xx {
+.jimu-widget-Rolling .rollinng-table-hezi-xx {
font-size: 20px;
margin-bottom: 5px;
margin-left: 5px;
}
-.rollinng-table-hezi-xx:hover {
+.jimu-widget-Rolling .rollinng-table-hezi-xx:hover {
cursor: pointer;
color: red;
}
-#slider {
+.jimu-widget-Rolling #slider {
position: absolute;
left: 150%;
top: 0;
@@ -70,11 +70,11 @@
z-index: 1;
}
-#slider:hover {
+.jimu-widget-Rolling #slider:hover {
cursor: ew-resize;
}
-.hiddenHeZi {
+.jimu-widget-Rolling .hiddenHeZi {
position: fixed;
width: 100%;
height: 100%;
diff --git a/widgets/visualAngle/Widget.js b/widgets/visualAngle/Widget.js
index 204fdf3..beb708a 100644
--- a/widgets/visualAngle/Widget.js
+++ b/widgets/visualAngle/Widget.js
@@ -35,6 +35,28 @@
$(".v-a-One").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' });
$(this).find('.v-a-o-img').attr("src", "../../../images/addL/wtiyan.png");
// .attr("src", src_value);
+
+ // 控制视角平移:
+ that.map.scene.screenSpaceCameraController.enableRotate = true
+
+ // true: 允许左键按下视角平移;
+
+ // false: 禁止左键按下视角平移;
+
+ // 控制视角缩放:
+ that.map.scene.screenSpaceCameraController.enableZoom = true
+
+ // true: 允许中键缩放视角;
+
+ // false:禁止中键缩放视角;
+
+ // 控制视角旋转:
+ that.map.scene.screenSpaceCameraController.enableTilt = true
+
+ // true:允许视角旋转;
+
+ // false:禁止视角旋转;
+
})
$(".v-a-Two").click(function () {
that.clearColor('two');
@@ -45,6 +67,9 @@
that.clearColor('three');
$(".v-a-Three").css({ 'backgroundColor': '#3F9DFD', 'color': '#fff' });
$(this).find('.v-a-o-img').attr("src", "../../../images/addL/wshijiao.png");
+ that.map.scene.screenSpaceCameraController.enableRotate = false
+ that.map.scene.screenSpaceCameraController.enableZoom = true
+ that.map.scene.screenSpaceCameraController.enableTilt = false
})
// $('.RouteNavigate-tool').click(function () {
--
Gitblit v1.9.3