liuyg
2021-06-17 616efb58777e55e853f013c173d3afa6b480bac5
添加剖面分析  调试坡度分析
8 files modified
14 files added
1075 ■■■■■ changed files
config.json 10 ●●●●● patch | view | raw | blame | history
widgets/MapPrinting/css/style.css 9 ●●●● patch | view | raw | blame | history
widgets/Tool/Widget.html 2 ●●●●● patch | view | raw | blame | history
widgets/Tool/Widget.js 71 ●●●● patch | view | raw | blame | history
widgets/legends/Widget.js 5 ●●●● patch | view | raw | blame | history
widgets/profileAnalysis/Widget.html 32 ●●●●● patch | view | raw | blame | history
widgets/profileAnalysis/Widget.js 373 ●●●●● patch | view | raw | blame | history
widgets/profileAnalysis/css/style.css 53 ●●●●● patch | view | raw | blame | history
widgets/profileAnalysis/manifest.json 17 ●●●●● patch | view | raw | blame | history
widgets/profileAnalysis/nls/es/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/profileAnalysis/nls/strings.js 7 ●●●●● patch | view | raw | blame | history
widgets/profileAnalysis/nls/zh-cn/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/searchL/Widget.js 2 ●●● patch | view | raw | blame | history
widgets/slope/Widget.html 37 ●●●●● patch | view | raw | blame | history
widgets/slope/Widget.js 324 ●●●●● patch | view | raw | blame | history
widgets/slope/css/style.css 19 ●●●●● patch | view | raw | blame | history
widgets/slope/manifest.json 17 ●●●●● patch | view | raw | blame | history
widgets/slope/nls/es/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/slope/nls/strings.js 7 ●●●●● patch | view | raw | blame | history
widgets/slope/nls/zh-cn/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/visibleArea/Widget.js 2 ●●● patch | view | raw | blame | history
widgets/visibleArea/css/style.css 68 ●●●● patch | view | raw | blame | history
config.json
@@ -92,7 +92,7 @@
          "relativeTo": "map"
        }
      },
   {
      {
        "uri": "widgets/ShowPosition/Widget",
        "position": {
          "right": 0,
@@ -225,6 +225,14 @@
      {
        "name": "可视化分析",
        "uri": "widgets/visibleArea/Widget"
      },
      {
        "name": "坡度坡向分析",
        "uri": "widgets/slope/Widget"
      },
      {
        "name": "剖面分析",
        "uri": "widgets/profileAnalysis/Widget"
      }
    ],
    "groups": [],
widgets/MapPrinting/css/style.css
@@ -57,14 +57,9 @@
}
.MapPrinting-flex-x {
  cursor: pointer;
  /* background-color: rgba(62,159,252, 0.75); */
  /* border: 1px solid rgba(62,159,252, 0.75); */
  font-size: 26px;
  /* border-radius: 10px; */
  /* padding: 5px; */
  position: relative;
  top: -2px;
  font-size: 18px;
  cursor: pointer;
}
.MapPrinting-flex-x :hover{
  color: red;
widgets/Tool/Widget.html
@@ -10,6 +10,8 @@
                <li class="sign-tool"><i></i> <span>我的标记</span></li>
                <li class="CoorPosition-tool"><i></i> <span>坐标定位</span></li>
                <li class="MapPrinting-tool"><i></i> <span>场景快照</span></li>
                <li class="visibleArea-tool"><i></i> <span>可视分析</span></li>
                <li class="profileAnalysis-tool"><i></i> <span>剖面分析</span></li>
                <!-- <li class="superposition-tool"><i></i> <span>叠加分析</span></li>
                <li class="buffer-tool"><i></i> <span>缓冲分析</span></li> -->
            </ul>
widgets/Tool/Widget.js
@@ -3,16 +3,16 @@
// 模块描述:显示坐标
///////////////////////////////////////////////////////////////////////////
define([
        'dojo/_base/declare',
        'dojo/_base/lang',
        'dojo/_base/array',
        'dojo/_base/html',
        'dojo/topic',
        'jimu/BaseWidget',
        'jimu/utils',
        'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
        'libs/zTree_v3/js/jquery.ztree.all'
    ],
    'dojo/_base/declare',
    'dojo/_base/lang',
    'dojo/_base/array',
    'dojo/_base/html',
    'dojo/topic',
    'jimu/BaseWidget',
    'jimu/utils',
    'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
    'libs/zTree_v3/js/jquery.ztree.all'
],
    function (declare,
        lang,
        array,
@@ -51,6 +51,8 @@
                    $('.jimu-widget-Sign').hide();
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $('.jimu-widget-Measurement').show();
@@ -70,6 +72,8 @@
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    topic.publish('openRolling', 'Rolling');
@@ -88,6 +92,8 @@
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    topic.publish('openSplitScreen', 'SplitScreen');
@@ -106,6 +112,8 @@
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    topic.publish('openSign', 'Sign');
@@ -126,6 +134,9 @@
                    topic.publish('closeSign', 'Sign');
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $('.jimu-widget-CoorPosition').show();
                    $('.tool-y-box').stop().hide();
@@ -146,13 +157,53 @@
                    topic.publish('closeSign', 'Sign');
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-CoorPosition').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $('.jimu-widget-MapPrinting').show();
                    $('.tool-y-box').stop().hide();
                })
                // 可视分析
                $('.visibleArea-tool').click(function () {
                    // 关闭量算
                    topic.publish('closeMeasurement', 'Measurement');
                    // 关闭卷帘
                    topic.publish('closeRolling', 'Rolling');
                    // 关闭分屏
                    topic.publish('closeSplitScreen', 'SplitScreen');
                    // 关闭标记
                    topic.publish('closeSign', 'Sign');
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-profileAnalysis").hide();
                    $(".jimu-widget-visibleArea").show();
                    $('.tool-y-box').stop().hide();
                })
                $('.profileAnalysis-tool').click(function () {
                    // 关闭量算
                    topic.publish('closeMeasurement', 'Measurement');
                    // 关闭卷帘
                    topic.publish('closeRolling', 'Rolling');
                    // 关闭分屏
                    topic.publish('closeSplitScreen', 'SplitScreen');
                    // 关闭标记
                    topic.publish('closeSign', 'Sign');
                    topic.publish('closeFlyRoute', 'FlyRoute');
                    $('.jimu-widget-CoorPosition').hide();
                    $('.jimu-widget-MapPrinting').hide();
                    $(".jimu-widget-visibleArea").hide();
                    $(".jimu-widget-profileAnalysis").show();
                    $('.tool-y-box').stop().hide();
                })
            },
widgets/legends/Widget.js
@@ -32,8 +32,11 @@
                topic.subscribe("getLegendsData", lang.hitch(this, this.onGetLegendsData));
                $('.ccsliu').click(() => {
                    $(".jimu-widget-visibleArea").show();
                    topic.publish('getbeginSlope', this.beginSlope);
                    $('.jimu-widget-slope').show();
                })
            },
            onGetLegendsData: function (item) {
                var val = item == '  ' ? '' : item;
widgets/profileAnalysis/Widget.html
New file
@@ -0,0 +1,32 @@
<div>
    <!-- <div id="cesiumContainer"></div> -->
    <div id='loadingbar' class="spinner">
        <div class="spinner-container container1">
            <div class="circle1"></div>
            <div class="circle2"></div>
            <div class="circle3"></div>
            <div class="circle4"></div>
        </div>
        <div class="spinner-container container2">
            <div class="circle1"></div>
            <div class="circle2"></div>
            <div class="circle3"></div>
            <div class="circle4"></div>
        </div>
        <div class="spinner-container container3">
            <div class="circle1"></div>
            <div class="circle2"></div>
            <div class="circle3"></div>
            <div class="circle4"></div>
        </div>
    </div>
    <div id="toolbar" class="param-container tool-bar">
        <button type="button" id="chooseViews" class="button black">剖面分析</button>
        <button type="button" id="clears" class="button black">清除</button>
        <i class="layui-icon closes">
            &#x1006;
        </i>
    </div>
    <canvas style="position : absolute; right : 7px; bottom : -530px;background-color:rgba(65, 65, 65, 0.5)" id="pro"
        height="0" width="0"></canvas>
</div>
widgets/profileAnalysis/Widget.js
New file
@@ -0,0 +1,373 @@
define([
    'dojo/_base/declare',
    'dojo/_base/lang',
    'dojo/_base/array',
    'dojo/_base/html',
    'dojo/topic',
    'jimu/BaseWidget',
],
    function (declare,
        lang,
        array,
        html,
        topic,
        BaseWidget
    ) {
        return declare([BaseWidget], {
            baseClass: 'jimu-widget-profileAnalysis',
            name: 'profileAnalysis',
            flag: false,
            startup: function () {
                var that = this;
                var viewer = that.map;
                var scene = viewer.scene;
                var URL_CONFIG = {
                    BINGMAP: "//dev.virtualearth.net"
                    // , BING_MAP_KEY: "AkOyUpgDCoz063AWW1WfHnxp5222UBdxLOp1XvRv0tuebQnr2S7UcZkiLgME7gX0"
                    // , SCENE_BIMBUILDING: "http://www.supermapol.com/realspace/services/3D-BIMbuilding/rest/realspace"
                    // , SCENE_CBD: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace"
                    // , SCENE_CHONGQING_TX: "http://www.supermapol.com/realspace/services/3D-CQmodel_wireframe_2000/rest/realspace"
                    // , SCENE_CLIP: "http://www.supermapol.com/realspace/services/3D-clip_fengbian/rest/realspace"
                    // , SCENE_FEATUREVALUE: "http://www.supermapol.com/realspace/services/3D-featureValue_building9/rest/realspace/datas/%E4%B9%9D%E5%8F%B7@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_BUILDIBG: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/building_udb@building/config"
                    // , SCENE_GTC_FLOOR9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E6%8B%89%E4%BD%8E%E6%A5%BC%E5%B1%82@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_GROUND: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%9C%B0%E9%9D%A2/config"
                    // , SCENE_GTC_HILL: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%B1%B1/config"
                    // , SCENE_GTC_LB9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E6%8B%89%E4%BD%8E%E6%A5%BC%E6%9D%BF@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_LWALL9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E6%8B%89%E4%BD%8E%E5%A2%99@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_LWINDOW9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E6%8B%89%E4%BD%8E%E7%AA%97@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_UINSIDE: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%86%85%E9%83%A8%E7%BB%93%E6%9E%84@%E5%AE%A4%E5%86%85/config"
                    // , SCENE_GTC_UNIT9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%90%88%E5%B9%B6%E5%90%8E@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_UOUTSIDE: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%A4%96%E9%83%A8%E7%BB%93%E6%9E%84@%E5%AE%A4%E5%86%85/config"
                    // , SCENE_GTC_UWINDOW: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/U%E5%9E%8B%E5%BB%BA%E7%AD%91%E7%AA%97@%E5%AE%A4%E5%86%85/config"
                    // , SCENE_GTC_WALL9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%90%88%E5%B9%B6%E5%89%8D%E5%A2%99@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_GTC_WINDOW9: "http://www.supermapol.com/realspace/services/3D-data_all/rest/realspace/datas/%E5%90%88%E5%B9%B6%E5%89%8D%E6%A5%BC%E6%9D%BF@%E4%B9%9D%E5%8F%B7%E6%A5%BC/config"
                    // , SCENE_HISTOGRAM: "http://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace"
                    // , SCENE_JINJIANG: "http://www.supermapol.com/realspace/services/3D-jinjiang/rest/realspace"
                    // , SCENE_MODELUPDATE: "http://www.supermapol.com/realspace/services/3D-MoXingGengXin/rest/realspace"
                    // , SCENE_MOVINGLIGHT: "http://www.supermapol.com/realspace/services/3D-BIMMoXing/rest/realspace"
                    // , SCENE_NIAOCHAO: "http://www.supermapol.com/realspace/services/3D-OlympicGreen20200416/rest/realspace"
                    // , SCENE_OLYMPIC: "http://www.supermapol.com/realspace/services/3D-Olympic/rest/realspace"
                    // , SCENE_OLYMPIC_GREEN: "http://www.supermapol.com/realspace/services/3D-SampleCodeForFan20200420/rest/realspace"
                    // , SCENE_OLYMPIC_NIGHT: "http://www.supermapol.com/realspace/services/3D-OlympicGreenNight/rest/realspace"
                    // , SCENE_POINTCLOUD: "http://www.supermapol.com/realspace/services/3D-cloud/rest/realspace"
                    // , SCENE_POLYLINEGROW_BUINDINGS: "http://www.supermapol.com/realspace/services/3D-buildings1122/rest/realspace"
                    // , SCENE_RECT: "http://www.supermapol.com/realspace/services/3D-Text01/rest/realspace"
                    // , SCENE_SGNS: "http://www.supermapol.com/realspace/services/3D-SGNS/rest/realspace"
                    // , SCENE_SICHUAN: "http://www.supermapol.com/realspace/services/3D-dixingyingxiang/rest/realspace"
                    // , SCENE_SRSB: "http://www.supermapol.com/realspace/services/3D-srsb/rest/realspace"
                    // , SCENE_SUOFEIYA: "http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace"
                    // , SCENE_TISHUJU: "http://www.supermapol.com/realspace/services/3D-tishuju/rest/realspace"
                    // , SCENE_VOLUME_NEAREST: "http://www.supermapol.com/realspace/services/3D-compare/rest/realspace"
                    // , SCENE_WIREFRAME: "http://www.supermapol.com/realspace/services/3D-wireFrame/rest/realspace"
                    // , SCENE_WebGLCBD: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace"
                    // , SCENE_XGPARK: "http://www.supermapol.com/realspace/services/3D-yanmofenxi/rest/realspace"
                    // , SCP_BIM: "https://www.supermapol.com/realspace/services/3D-S3MData/rest/realspace/datas/T8H_NoLod/config"
                    , SCP_CBD_BRIDGE: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace/datas/Ground_qiao@CBD/config"
                    , SCP_CBD_BUILD: "http://www.supermapol.com/realspace/services/3D-CBD/rest/realspace/datas/Building@CBD/config"
                    , SCP_CBD_GROUND1: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace/datas/Ground_1@CBD/config"
                    // , SCP_CBD_GROUND2: "http://www.supermapol.com/realspace/services/3D-WebGLCBD/rest/realspace/datas/Ground_2@%E6%96%B0CBD/config"
                    , SCP_CBD_LAKE: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace/datas/Lake@CBD/config"
                    , SCP_CBD_ROAD: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace/datas/Ground_Daolu@CBD/config"
                    , SCP_CBD_TREE: "http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace/datas/Tree@CBD/config"
                    // , SCP_FCFH_DATA: "http://www.supermapol.com/realspace/services/data-FCFH_Shangdong/rest/data"
                    // , SCP_FCFH_QX: "http://www.supermapol.com/realspace/services/3D-FCFH_Shangdong/rest/realspace/datas/config/config"
                    // , SCP_FCFH_VECTOR_EXTRUDE: "http://www.supermapol.com/realspace/services/3D-individualHouse/rest/realspace/datas/%E4%B8%93%E9%A2%98%E6%88%B7%E5%9E%8B%E9%9D%A2_%E6%8B%89%E4%BC%B8/config"
                    // , SCP_HISTOGRAM1: "http://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace/datas/Point2D_3000_5000/config"
                    // , SCP_HISTOGRAM2: "http://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace/datas/Point2D_10000_max/config"
                    // , SCP_HISTOGRAM3: "http://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace/datas/Point2D_min_1000/config"
                    // , SCP_HISTOGRAM4: "http://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace/datas/Point2D_5000_10000/config"
                    // , SCP_HISTOGRAM5: "http://www.supermapol.com/realspace/services/3D-Histogram/rest/realspace/datas/Point2D_1000_3000/config"
                    // , SCP_JINJIANG: "http://www.supermapol.com/realspace/services/3D-jinjiang/rest/realspace/datas/jinjiang/config"
                    // , SCP_NIAOCHAO: "http://www.supermapol.com/realspace/services/3D-niaocao_water/rest/realspace/datas/%E9%B8%9F%E5%B7%A2%E4%BA%94%E6%9C%9F/config"
                    // , SCP_NIAOCHAO_WATER: "http://www.supermapol.com/realspace/services/3D-Olympic/rest/realspace/datas/NewDataset@water-caijian/config"
                    // , SCP_OLYMPIC_BILLBOARD: "http://www.supermapol.com/realspace/services/3D-WebGLOlympicGreen/rest/realspace/datas/BillBoard@OlympicGreen/config"
                    // , SCP_OLYMPIC_BUILD: "http://www.supermapol.com/realspace/services/3D-WebGLOlympicGreen/rest/realspace/datas/Building@OlympicGreen/config"
                    // , SCP_OLYMPIC_GROUND: "http://www.supermapol.com/realspace/services/3D-WebGLOlympicGreen/rest/realspace/datas/Ground@OlympicGreen/config"
                    // , SCP_OLYMPIC_TREE: "http://www.supermapol.com/realspace/services/3D-WebGLOlympicGreen/rest/realspace/datas/Tree@OlympicGreen/config"
                    // , SCP_OLYMPIC_WATER: "http://www.supermapol.com/realspace/services/3D-WebGLOlympicGreen/rest/realspace/datas/Waters@OlympicGreen/config"
                    // , SCP_PIPELINE: "https://www.supermapol.com/realspace/services/3D-pipeline_s3m/rest/realspace/datas/NetWork@Pipe3D/config"
                    // , SCP_POINTCLOUD: "http://www.supermapol.com/realspace/services/3D-cloud/rest/realspace/datas/POINTCLOUD23/config"
                    // , SCP_SGNS: "http://www.supermapol.com/realspace/services/3D-SGNS/rest/realspace/datas/siguniang/config"
                    // , SCP_SRSB: "http://www.supermapol.com/realspace/services/3D-srsb/rest/realspace/datas/srsb/config"
                    // , SCP_SRSB_WATER: "http://www.supermapol.com/realspace/services/3D-srsb/rest/realspace/datas/%E6%B0%B4%E9%9D%A2@vector/config"
                    // , SCP_SUOFEIYA: "http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace/datas/Config/config"
                    // , SCP_VECTOR_LINE: "http://www.supermapol.com/realspace/services/3D-China/rest/realspace/datas/Line/config"
                    // , SCP_VECTOR_POLYGON: "http://www.supermapol.com/realspace/services/3D-China/rest/realspace/datas/%E4%B8%93%E9%A2%98%E5%9B%BE/config"
                    // , SCP_VECTOR_TEXT: "http://www.supermapol.com/realspace/services/3D-China/rest/realspace/datas/text/config"
                    // , SCP_WORLD_COUNTRY_VECTOR: "http://www.supermapol.com/realspace/services/3D-Countries-World2/rest/realspace/datas/Countries_1@World/config"
                    // , SCP_WORLD_COUNTRY_VECTOR2: " http://www.supermapol.com/realspace/services/3D-ShiJieGuoJiaBianJie/rest/realspace"
                    // , SCP_XGPARK: "http://www.supermapol.com/realspace/services/3D-yanmofenxi/rest/realspace/datas/sci_park/config"
                    // , STK: "https://www.supermapol.com/realspace/services/3D-stk_terrain/rest/realspace/datas/info/data/path"
                    // , SUPERMAP_IMG_MEC: "http://www.supermapol.com/realspace/services/map-China400/rest/maps/China400"
                    // , SUPERMAP_IMG_WGS: "http://www.supermapol.com/realspace/services/map-World/rest/maps/World_Google"
                    // , SiChuan_IMG: "http://www.supermapol.com/realspace/services/3D-dixingyingxiang/rest/realspace/datas/MosaicResult"
                    // , SiChuan_TERRAIN: "http://www.supermapol.com/realspace/services/3D-dixingyingxiang/rest/realspace/datas/DatasetDEM"
                    // , TDT_IMG: "https://[subdomain].tianditu.com/img_w/wmts"
                    // , TDT_LABEL: "https://[subdomain].tianditu.com/cia_w/wmts"
                    // , TENSE_IMG0: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0300@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG1: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0310@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG2: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0330@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG3: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0340@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG4: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0350@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG5: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0400@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG6: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0410@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG7: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0420@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG8: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0430@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG9: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0440@%E6%88%BF%E5%B1%B1"
                    // , TENSE_IMG10: "http://www.supermapol.com/realspace/services/3D-HuanJingJianCe-2/rest/realspace/datas/rs0450@%E6%88%BF%E5%B1%B1"
                    // , TOKEN_TIANDITU: "4a00a1dc5387b8ed8adba3374bd87e5e"
                    // , ZF_IMG: "http://www.supermapol.com/realspace/services/3D-dxyx_ios2/rest/realspace/datas/MosaicResult_2@IMAGE_1"
                    // , ZF_IMG2: "http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image"
                    // , ZF_TERRAIN: "http://www.supermapol.com/realspace/services/3D-dxyx_ios2/rest/realspace/datas/DatasetDEM_1@sichuanTer"
                    // , ZF_TERRAIN2: "http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/srtm_54_07@zhufeng"
                }
                scene.shadowMap.darkness = 1.275; //设置第二重烘焙纹理的效果(明暗程度)
                scene.skyAtmosphere.brightnessShift = 0.4;  //修改大气的亮度
                scene.debugShowFramesPerSecond = false;
                scene.hdrEnabled = false;
                scene.sun.show = false;
                // 01设置环境光的强度-新处理CBD场景
                scene.lightSource.ambientLightColor = new Cesium.Color(0.65, 0.65, 0.65, 1);
                // 添加光源
                var position1 = new Cesium.Cartesian3.fromDegrees(116.261209157595, 39.3042238956531, 480);
                //光源方向点
                var targetPosition1 = new Cesium.Cartesian3.fromDegrees(116.261209157595, 39.3042238956531, 430);
                var dirLightOptions = {
                    targetPosition: targetPosition1,
                    color: new Cesium.Color(1.0, 1.0, 1.0, 1),
                    intensity: 0.55
                };
                directionalLight_1 = new Cesium.DirectionalLight(position1, dirLightOptions);
                scene.addLightSource(directionalLight_1);
                $("#toolbar").show();
                $('#loadingbar').remove();
                if (!scene.pickPositionSupported) {
                    alert('不支持深度纹理,剖面分析功能无法使用!');
                }
                //创建剖面分析对象
                var profile = new Cesium.Profile(scene);
                function createTooltip(frameDiv) {//抄录createTooltip函数
                    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(document.body);
                var widget = viewer.cesiumWidget;
                try {
                    //添加S3M图层 // 舍弃
                    // var ground1Promise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, {
                    //     name: 'ground1'
                    // });
                    // var buildPromise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, {
                    //     name: 'build'
                    // });
                    // var lakePromise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_LAKE, {
                    //     name: 'lake'
                    // });
                    // var treePromise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_TREE, {
                    //     name: 'tree'
                    // });
                    // var roadPromise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_ROAD, {
                    //     name: 'road'
                    // });
                    // var bridgePromise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BRIDGE, {
                    //     name: 'bridge'
                    // });
                    // var promiseSet = [ground1Promise, buildPromise, lakePromise, treePromise, roadPromise, bridgePromise];
                    // Cesium.when.all(promiseSet, function (layer) {
                    //     scene.camera.setView({ //图层加载完成,设置相机位置
                    //         destination: Cesium.Cartesian3.fromDegrees(116.4473, 39.9011, 127),
                    //         orientation: {
                    //             heading: 0.2732,
                    //             pitch: -0.1583,
                    //             roll: 0
                    //         }
                    //     });
                    //     for (var i = 0; i < layer.length; i++) {
                    //         layer[i].selectEnabled = false;
                    //     }
                    // }, function (e) {
                    //     if (widget._showRenderLoopErrors) {
                    //         var title = '加载SCP失败,请检查网络连接状态或者url地址是否正确?';
                    //         widget.showErrorPanel(title, undefined, e);
                    //     }
                    // });
                    var handlerLine = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Line);
                    handlerLine.activeEvt.addEventListener(function (isActive) {
                        if (isActive == true) {
                            viewer.enableCursorStyle = false;
                            viewer._element.style.cursor = '';
                            $('body').removeClass('drawCur').addClass('drawCur');
                        } else {
                            viewer.enableCursorStyle = true;
                            $('body').removeClass('drawCur');
                        }
                    });
                    handlerLine.movingEvt.addEventListener(function (windowPosition) {
                        if (handlerLine.isDrawing) {
                            tooltip.showAt(windowPosition, '<p>右键单击结束绘制</p>');
                        } else {
                            tooltip.showAt(windowPosition, '<p>点击绘制第一个点</p>');
                        }
                    });
                    var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
                    handlerLine.drawEvt.addEventListener(function (result) {
                        tooltip.setVisible(false);
                        var line = result.object;
                        var startPoint = line._positions[0];
                        var endPoint = line._positions[line._positions.length - 1];
                        var scartographic = Cesium.Cartographic.fromCartesian(startPoint);
                        var slongitude = Cesium.Math.toDegrees(scartographic.longitude);
                        var slatitude = Cesium.Math.toDegrees(scartographic.latitude);
                        var sheight = scartographic.height;
                        var ecartographic = Cesium.Cartographic.fromCartesian(endPoint);
                        var elongitude = Cesium.Math.toDegrees(ecartographic.longitude);
                        var elatitude = Cesium.Math.toDegrees(ecartographic.latitude);
                        var eheight = ecartographic.height;
                        //设置坡面分析的开始和结束位置
                        profile.startPoint = [slongitude, slatitude, sheight];
                        profile.endPoint = [elongitude, elatitude, eheight];
                        profile.extendHeight = 40;
                        //分析完毕的回调函数
                        profile.getBuffer(function (buffer) {
                            var canvas = document.getElementById("pro");
                            canvas.height = profile._textureHeight;
                            canvas.width = profile._textureWidth;
                            var ctx = canvas.getContext("2d");
                            var imgData = ctx.createImageData(profile._textureWidth, profile._textureHeight);
                            imgData.data.set(buffer);
                            //在canvas上绘制图片
                            ctx.putImageData(imgData, 0, 0);
                            $("#pro").width(600);
                            $("#pro").height(450);
                        });
                        profile.build();
                    });
                    document.getElementById("chooseViews").onclick = function () {
                        //先清除之前绘制的线
                        console.log('kais')
                        handlerLine.clear();
                        $("#pro").width(0);
                        $("#pro").height(0);
                        if (handlerLine.active) {
                            return;
                        } else {
                            handlerLine.activate();
                            //由于剖面分析只能绘制直线,此处绘制时单击两次就触发结束事件
                            handler.setInputAction(function (e) {
                                if (handlerLine.polyline._actualPositions.length == 2) {
                                    var result = {};
                                    result.object = handlerLine.polyline;
                                    handlerLine.drawEvt.raiseEvent(result);
                                    handlerLine.deactivate();
                                    handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
                                }
                            }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
                        }
                    };
                    document.getElementById("clears").onclick = function () {
                        handlerLine.clear();
                        $("#pro").width(0);
                        $("#pro").height(0);
                    }
                } catch (e) {
                    // if (scene.context.depthTexture) {
                    // swal("剖面分析", "该浏览器不支持深度纹理检测", "warning");
                    // }
                    console.log(e)
                }
                $('.jimu-widget-profileAnalysis').find(".closes").click(function () {
                    $(".jimu-widget-profileAnalysis").hide();
                    handlerLine.clear();
                    $("#pro").width(0);
                    $("#pro").height(0);
                })
            },
            onOpen: function () {
            },
            onClose: function () {
                //面板关闭的时候触发 (when this panel is closed trigger)
            },
            onMinimize: function () {
                this.resize();
            },
            onMaximize: function () {
                this.resize();
            },
            resize: function () {
            },
            destroy: function () {
                //销毁的时候触发
                //todo
                //do something before this func
                this.inherited(arguments);
            }
        });
    });
widgets/profileAnalysis/css/style.css
New file
@@ -0,0 +1,53 @@
.jimu-widget-profileAnalysis {
  position: fixed !important;
  top: 96px !important;
  right: 10px !important;
  width: 200px !important;
  height: 40px !important;
  background-color: rgb(255, 255, 255);
  font-size: 14px;
  color: rgb(0, 0, 0);
  font-size: 16px;
  z-index: 11 !important;
  border-radius: 10px;
  display: none;
  box-shadow: 0 0 8px #fff;
  padding: 0px 5px !important;
}
.jimu-widget-profileAnalysis #toolbar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 14px;
}
.jimu-widget-profileAnalysis #toolbar #chooseViews, .jimu-widget-profileAnalysis #toolbar #clears {
  width: auto;
  padding: 0 8px;
  height: 30px;
  border-radius: 5px;
  background-color: #fff;
  border: 1px solid transparent;
  box-shadow: 3px 3px 15px -5px #39A5FD;
  cursor: pointer;
}
.jimu-widget-profileAnalysis #toolbar #chooseViews:hover, .jimu-widget-profileAnalysis #toolbar #clears:hover {
  background-color: #3E9FFC;
  box-shadow: 3px 3px 20px -4px #000000;
  filter: grayscale(100%) brightness(200%);
}
.jimu-widget-profileAnalysis #toolbar .closes {
  position: relative;
  left: 3px;
  font-size: 18px;
  cursor: pointer;
}
.jimu-widget-profileAnalysis #toolbar .closes:hover {
  color: red;
}
widgets/profileAnalysis/manifest.json
New file
@@ -0,0 +1,17 @@
{
  "name": "profileAnalysis",
  "2D": true,
  "3D": true,
  "platform": "HTML",
  "version": "2.10",
  "wabVersion": "2.10",
  "author": "liuyg",
  "description": "",
  "copyright": "",
  "license": "",
  "properties": {
    "hasConfig": false,
    "inPanel": false,
    "hasVersionManager": false
  }
}
widgets/profileAnalysis/nls/es/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "profileAnalysis"
  })
);
widgets/profileAnalysis/nls/strings.js
New file
@@ -0,0 +1,7 @@
define({
  root: ({
    _widgetLabel: "profileAnalysis"
  }),
  "es": 1,
  "zh-cn": 1
});
widgets/profileAnalysis/nls/zh-cn/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "剖面分析"
  })
);
widgets/searchL/Widget.js
@@ -233,7 +233,7 @@
            clickHand: function clickHand(data) {
                var pickedObjects = this.map.scene.drillPick(data.position) || 0;
                // console.log(pickedObjects);
                if (pickedObjects.length != 0) {
                if (pickedObjects.length != 0 && pickedObjects.id != undefined) {
                    var data = pickedObjects[0].primitive.id.onceData[1];
                    if (pickedObjects[0].primitive.id.onceData[0] == 1) {//全景
widgets/slope/Widget.html
New file
@@ -0,0 +1,37 @@
<div>
    <div id="float"
        style="background:#95e8f9;width: 250px;height: 470px;top: 15px;left: 1.5%;opacity: 1">
        <div id="con" style="background:#95e8f9;width: 230px;height: 450px;top: 85px;left: 1.1%;margin: 10px">
            <label for="calMode">1、计算模式:</label>
            <select id="calMode">
                <option value="calModeall_plane">指定多边形区域</option>
                <option value="calModeall_any">全部区域参与分析</option>
                <option value="calModeall_none">全部区域不参与分析</option>
            </select><br>
            <label>2、坡度区间:</label>
            <label> 起:</label>
            <input type="range" id="wideminR" min="0" max="90" value="0" style="width: 170px" ;>
            <input type="number" id="widemin" min="0" max="90" value="0" style="width: 30px"> <label> 终:</label>
            <input type="range" id="widemaxR" min="0" max="90" value="78" style="width: 170px">
            <input type="number" id="widemax" min="0" max="90" value="78" style="width: 30px;">
            <label>3、显示样式:</label>
            <label><input type="radio" id="showcolor" name="fill">显示填充颜色</label>
            <label><input type="radio" id="showarrow" name="fill">显示坡向箭头</label>
            <label><input type="radio" id="showall" name="fill" checked="checked">填充颜色和坡向箭头</label>
            <label>4、颜色条带:</label>
            <div id="bar">
                <select id="colorTable1" class="selectpicker">
                    <option value="1" data-content="<span class='label band4'>&nbsp</span>">&nbsp</option>
                    <option value="2" data-content="<span class='label band2'>&nbsp</span>">&nbsp</option>
                    <option value="3" data-content="<span class='label band3'>&nbsp</span>">&nbsp</option>
                    <option value="4" data-content="<span class='label band1'>&nbsp</span>">&nbsp</option>
                    <option value="5" data-content="<span class='label band5'>&nbsp</span>">&nbsp</option>
                </select>
            </div>
            <br>
            <label>5、透明调节:</label>
            <input type="number" step="0.1" id="trans" min="0" max="1" value="0.5" style="width:100px">
            <input type="button" id="cance" value="清除结果">
        </div>
    </div>
</div>
widgets/slope/Widget.js
New file
@@ -0,0 +1,324 @@
define([
    'dojo/_base/declare',
    'dojo/_base/lang',
    'dojo/_base/array',
    'dojo/_base/html',
    'dojo/topic',
    'jimu/BaseWidget',
],
    function (declare,
        lang,
        array,
        html,
        topic,
        BaseWidget
    ) {
        return declare([BaseWidget], {
            baseClass: 'jimu-widget-slope',
            name: 'slope',
            flag: false,
            startup: function () {
                var that = this;
                topic.subscribe("getbeginSlope", lang.hitch(this, this.beginSlope));
                // topic.publish('getbeginSlope', that.beginSlope);
            },
            beginSlope: function () {
                console.log('beginSlope');
                var that = this;
                var viewer = that.map;
                var scene = viewer.scene;
                scene.globe.enableLighting = true;
                //添加SuperMap iServer发布的影像服务
                viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
                    url: 'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/image'
                }));
                // viewer.scene.camera.setView({
                //     destination: Cesium.Cartesian3.fromDegrees(87.1, 27.8, 8000.0),
                //     orientation: {
                //         heading: 6.10547067016156,
                //         pitch: -0.8475077031996778,
                //         roll: 6.2831853016686185
                //     }
                // });
                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(0, new Cesium.Color(9 / 255, 9 / 255, 255 / 255));
                var wide;
                wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;
                slope.ColorTable = colorTable;
                slope.Opacity = 0.5;
                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 handlerPolygon = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Polygon, 0);
                handlerPolygon.activeEvt.addEventListener(function (isActive) {
                    if (isActive == true) {
                        viewer.enableCursorStyle = false;
                        viewer._element.style.cursor = '';
                        $('body').removeClass('drawCur').addClass('drawCur');
                    } else {
                        viewer.enableCursorStyle = true;
                        $('body').removeClass('drawCur');
                    }
                });
                handlerPolygon.movingEvt.addEventListener(function (windowPosition) {
                    if (windowPosition.x < 200 && windowPosition.y < 150) {
                        tooltip.setVisible(false);
                        return;
                    }
                });
                handlerPolygon.drawEvt.addEventListener(function (result) {
                    if (!result.object.positions) {
                        handlerPolygon.polygon.show = false;
                        handlerPolygon.polyline.show = false;
                        handlerPolygon.deactivate();
                        handlerPolygon.activate();
                        return;
                    }
                    var array = [].concat(result.object.positions);
                    tooltip.setVisible(false);
                    var positions = [];
                    for (var i = 0, len = array.length; i < len; i++) {
                        var cartographic = Cesium.Cartographic.fromCartesian(array[i]);
                        var longitude = Cesium.Math.toDegrees(cartographic.longitude);
                        var latitude = Cesium.Math.toDegrees(cartographic.latitude);
                        var h = cartographic.height;
                        if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) {
                            positions.push(longitude);
                            positions.push(latitude);
                            positions.push(h);
                        }
                    }
                    slope.CoverageArea = positions;
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                    handlerPolygon.polygon.show = false;
                    handlerPolygon.polyline.show = true;
                    handlerPolygon.deactivate();
                    handlerPolygon.activate();
                });
                handlerPolygon.activate();
                document.getElementById("cance").onclick = function () {
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE
                    };
                    handlerPolygon.polygon.show = false;
                    handlerPolygon.polyline.show = false;
                };
                viewer._cesiumWidget._creditContainer.style.display = "none";
                $("#split").on("click", function () {
                    $("#float").slideToggle(500);
                }
                );
                $("#trans").on("input change", function () {
                    slope.Opacity = this.value;
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                });
                $("#wideminR").on("input change", function () {
                    var a = document.getElementById("widemin");
                    a.value = this.value;
                    slope.MinVisibleValue = this.value;
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                });
                $("#widemin").on("input change", function () {
                    var a = document.getElementById("widemin");
                    a.value = this.value;
                });
                $("#widemaxR").on("input change", function () {
                    var a = document.getElementById("widemax");
                    a.value = this.value;
                    slope.MaxVisibleValue = this.value;
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                });
                $("#widemax").on("input change", function () {
                    var a = document.getElementById("widemaxR");
                    a.value = this.value;
                });
                $("#calMode").on("input change", function () {
                    var index = document.getElementById("calMode").selectedIndex;
                    switch (index) {
                        case 0:
                            wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_REGION;
                            break;
                        case 1:
                            wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL;
                            break;
                        case 2:
                            wide = Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_NONE;
                            break;
                        default:
                            break;
                    }
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                });
                $(":radio[name='fill']").change(function () {
                    if (document.getElementById("showcolor").checked) {
                        slope.DisplayMode = Cesium.SlopeSettingEnum.DisplayMode.FACE;
                    } else if (document.getElementById("showarrow").checked) {
                        slope.DisplayMode = Cesium.SlopeSettingEnum.DisplayMode.ARROW;
                    } else {
                        slope.DisplayMode = Cesium.SlopeSettingEnum.DisplayMode.FACE_AND_ARROW;
                    }
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                }
                )
                $("#colorTable1").on("input change", function () {
                    colorTable.remove(0);
                    colorTable.remove(20);
                    colorTable.remove(30);
                    colorTable.remove(50);
                    colorTable.remove(80);
                    var value = document.getElementById("colorTable1").selectedIndex;
                    switch (value) {
                        case 0:
                            colorTable.insert(0, new Cesium.Color(9 / 255, 9 / 255, 255 / 255));
                            colorTable.insert(20, new Cesium.Color(0, 161 / 255, 1));
                            colorTable.insert(30, new Cesium.Color(20 / 255, 187 / 255, 18 / 255));
                            colorTable.insert(50, new Cesium.Color(221 / 255, 224 / 255, 7 / 255));
                            colorTable.insert(80, new Cesium.Color(255 / 255, 0 / 255, 0 / 255));
                            break;
                        case 1:
                            colorTable.insert(0, new Cesium.Color(162 / 255, 251 / 255, 194 / 255));
                            colorTable.insert(20, new Cesium.Color(180 / 255, 200 / 255, 170 / 255));
                            colorTable.insert(30, new Cesium.Color(200 / 255, 160 / 255, 130 / 255));
                            colorTable.insert(50, new Cesium.Color(225 / 255, 130 / 255, 130 / 255));
                            colorTable.insert(80, new Cesium.Color(1, 103 / 255, 103 / 255));
                            break;
                        case 2:
                            colorTable.insert(0, new Cesium.Color(230 / 255, 198 / 255, 1));
                            colorTable.insert(20, new Cesium.Color(210 / 255, 150 / 255, 1));
                            colorTable.insert(30, new Cesium.Color(190 / 255, 100 / 255, 1));
                            colorTable.insert(50, new Cesium.Color(165, 50 / 255, 1));
                            colorTable.insert(80, new Cesium.Color(157 / 255, 0, 1));
                            break;
                        case 3:
                            colorTable.insert(0, new Cesium.Color(0, 39 / 255, 148 / 255));
                            colorTable.insert(20, new Cesium.Color(0, 39 / 255, 148 / 255));
                            colorTable.insert(30, new Cesium.Color(70 / 255, 116 / 255, 200 / 255));
                            colorTable.insert(50, new Cesium.Color(149 / 255, 232 / 255, 249 / 255));
                            colorTable.insert(80, new Cesium.Color(149 / 255, 232 / 255, 249 / 255));
                            break;
                        case 4:
                            colorTable.insert(0, new Cesium.Color(186 / 255, 1, 190 / 255));
                            colorTable.insert(20, new Cesium.Color(186 / 255, 1, 180 / 255));
                            colorTable.insert(30, new Cesium.Color(106 / 255, 255 / 255, 170 / 255));
                            colorTable.insert(50, new Cesium.Color(26 / 255, 255 / 255, 160 / 255));
                            colorTable.insert(80, new Cesium.Color(26 / 255, 255 / 255, 156 / 255));
                            break;
                        default:
                            break;
                    }
                    slope.ColorTable = colorTable;
                    viewer.scene.globe.SlopeSetting = {
                        slopeSetting: slope,
                        analysisMode: wide
                    };
                });
                if (!scene.pickPositionSupported) {
                    alert('不支持深度纹理,无法绘制多边形,根据多边形显示分析区域功能无法使用!');
                }
                $('#toolbar').show();
                $('#btnContainer').show();
                $('#loadingbar').remove();
            },
            onOpen: function () {
            },
            onClose: function () {
                //面板关闭的时候触发 (when this panel is closed trigger)
            },
            onMinimize: function () {
                this.resize();
            },
            onMaximize: function () {
                this.resize();
            },
            resize: function () {
            },
            destroy: function () {
                //销毁的时候触发
                //todo
                //do something before this func
                this.inherited(arguments);
            }
        });
    });
widgets/slope/css/style.css
New file
@@ -0,0 +1,19 @@
.jimu-widget-slope {
  position: fixed !important;
  top: 100px !important;
  right: 50px !important;
  width: 200px !important;
  height: 40px !important;
  background-color: rgb(218, 218, 218);
  font-size: 14px;
  /* border: 1px solid rgb(69, 154, 251); */
  /* opacity      : .8; */
  color: rgb(0, 0, 0);
  font-size: 16px;
  z-index: 101;
  border-radius: 5px;
  display: none;
  box-shadow: 0 0 8px #fff;
  padding: 0px 5px !important;
}
widgets/slope/manifest.json
New file
@@ -0,0 +1,17 @@
{
  "name": "slope",
  "2D": true,
  "3D": true,
  "platform": "HTML",
  "version": "2.10",
  "wabVersion": "2.10",
  "author": "liuyg",
  "description": "",
  "copyright": "",
  "license": "",
  "properties": {
    "hasConfig": false,
    "inPanel": false,
    "hasVersionManager": false
  }
}
widgets/slope/nls/es/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "slope"
  })
);
widgets/slope/nls/strings.js
New file
@@ -0,0 +1,7 @@
define({
  root: ({
    _widgetLabel: "slope"
  }),
  "es": 1,
  "zh-cn": 1
});
widgets/slope/nls/zh-cn/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "坡度坡向分析"
  })
);
widgets/visibleArea/Widget.js
@@ -271,7 +271,7 @@
                        viewModel.horizontalFov = viewshed3D.horizontalFov;
                        viewModel.verticalFov = viewshed3D.verticalFov;
                    } else {
                        console.log('没打开')
                        console.log('没打开');
                    }
                }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
widgets/visibleArea/css/style.css
@@ -1,20 +1,18 @@
.jimu-widget-visibleArea {
  position: fixed !important;
  top: 100px !important;
  right: 50px !important;
  top: 96px !important;
  right: 10px !important;
  width: 200px !important;
  height: 50px !important;
  background-color: rgb(218, 218, 218);
  height: 40px !important;
  background-color: rgb(255, 255, 255);
  font-size: 14px;
  /* border: 1px solid rgb(69, 154, 251); */
  /* opacity      : .8; */
  color: rgb(0, 0, 0);
  font-size: 16px;
  z-index: 101;
  border-radius: 5px;
  z-index: 11;
  border-radius: 10px;
  display: none;
  box-shadow: 0 0 8px #fff;
  padding: 0px 10px !important;
  padding: 0px 5px !important;
}
.jimu-widget-visibleArea input[type=range] {
@@ -43,47 +41,49 @@
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 14px;
}
.jimu-widget-visibleArea #toolbar #chooseView, .jimu-widget-visibleArea #toolbar #clear {
  width: auto;
  padding: 0 8px;
  height: 35px;
  height: 30px;
  border-radius: 5px;
  background-color: #fff;
  border: 1px solid transparent;
  box-shadow: 3px 3px 15px -5px #39A5FD;
  cursor: pointer;
}
.jimu-widget-visibleArea #toolbar #chooseView:hover, .jimu-widget-visibleArea #toolbar #clear:hover {
  background-color: #3E9FFC;
  box-shadow: 3px 3px 20px -4px #000000;
  filter: grayscale(100%) brightness(200%);
}
.jimu-widget-visibleArea #toolbar .closes {
  position: absolute;
  top: -20px;
  right: -13px;
  width: 24px;
  height: 24px;
  color: #fff;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  background: #3E9FFC;
  border-radius: 50%;
  border: 1px solid #3E9FFC;
  position: relative;
  left: 3px;
  font-size: 18px;
  cursor: pointer;
}
.jimu-widget-visibleArea #toolbar .closes:hover {
  color: red;
}
.jimu-widget-visibleArea #wrapper .close {
  display: inline-block;
  position: absolute;
  top: -20px;
  right: -13px;
  width: 24px;
  height: 24px;
  color: #fff;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  background: #3E9FFC;
  border-radius: 50%;
  border: 1px solid #3E9FFC;
  right: 10px;
  top: 10px;
  font-size: 20px;
  cursor: pointer;
  z-index: 16;
}
.jimu-widget-visibleArea #wrapper .close:hover {
  color: red;
}
.jimu-widget-visibleArea #wrapper {
@@ -91,7 +91,7 @@
  height: 399px;
  position: absolute;
  top: 70px !important;
  left: -30px !important;
  left: -65px !important;
  padding: 18px 6% 20px 6%;
  background: rgb(247, 247, 247);
  border-radius: 5px;