From 25ce610f6ecca7325e7a743dc032c4a76559c63d Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 02 Jul 2021 09:10:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
---
widgets/slope/Widget.js | 57 ++++++++-------------------------------------------------
1 files changed, 8 insertions(+), 49 deletions(-)
diff --git a/widgets/slope/Widget.js b/widgets/slope/Widget.js
index a5f81a5..65114f2 100644
--- a/widgets/slope/Widget.js
+++ b/widgets/slope/Widget.js
@@ -41,66 +41,25 @@
// roll: 6.2831853016686185
// }
// });
+ viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
+ url: 'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image'
+ }));
var slope = new Cesium.SlopeSetting();
slope.DisplayMode = Cesium.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW;
slope.MaxVisibleValue = document.getElementById("widemax").value;
slope.MinVisibleValue = document.getElementById("widemin").value;
var colorTable = new Cesium.ColorTable();
- colorTable.insert(80, new Cesium.Color(255 / 255, 0 / 255, 0 / 255));
- colorTable.insert(50, new Cesium.Color(221 / 255, 224 / 255, 7 / 255));
- colorTable.insert(30, new Cesium.Color(20 / 255, 187 / 255, 18 / 255));
- colorTable.insert(20, new Cesium.Color(0, 161 / 255, 1));
+ colorTable.insert(8000, new Cesium.Color(255 / 255, 0 / 255, 0 / 255));
+ colorTable.insert(5000, new Cesium.Color(221 / 255, 224 / 255, 7 / 255));
+ colorTable.insert(3000, new Cesium.Color(20 / 255, 187 / 255, 18 / 255));
+ colorTable.insert(2000, new Cesium.Color(0, 161 / 255, 1));
colorTable.insert(0, new Cesium.Color(9 / 255, 9 / 255, 255 / 255));
var wide;
wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;
slope.ColorTable = colorTable;
slope.Opacity = 1;
- function createTooltip(frameDiv) {//创建需要的函数
-
- var tooltip = function (frameDiv) {
-
- var div = document.createElement('DIV');
- div.className = "twipsy right";
-
- var arrow = document.createElement('DIV');
- arrow.className = "twipsy-arrow";
- div.appendChild(arrow);
-
- var title = document.createElement('DIV');
- title.className = "twipsy-inner";
- div.appendChild(title);
-
- this._div = div;
- this._title = title;
- this.message = '';
-
- // add to frame div and display coordinates
- frameDiv.appendChild(div);
- var that = this;
- div.onmousemove = function (evt) {
- that.showAt({ x: evt.clientX, y: evt.clientY }, that.message);
- };
- };
-
- tooltip.prototype.setVisible = function (visible) {
- this._div.style.display = visible ? 'block' : 'none';
- };
-
- tooltip.prototype.showAt = function (position, message) {
- if (position && message) {
- this.setVisible(true);
- this._title.innerHTML = message;
- this._div.style.left = position.x + 10 + "px";
- this._div.style.top = (position.y - this._div.clientHeight / 2) + "px";
- this.message = message;
- }
- };
-
- return new tooltip(frameDiv);
- }
-
- var tooltip = createTooltip(viewer._element);
+ var tooltip = window.MYcreateTooltip(viewer._element);
//绘制多边形
var handlerPolygon = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Polygon, 0);
handlerPolygon.activeEvt.addEventListener(function (isActive) {
--
Gitblit v1.9.3