nnnjjj123
2020-11-17 e7bc0b68e57e1f2824a71873bc4ef22eb1e65084
Merge remote-tracking branch 'origin/master'
6 files modified
28 files added
1196 ■■■■ changed files
config.json 75 ●●●●● patch | view | raw | blame | history
images/circle_bg.png patch | view | raw | blame | history
images/zhui.glb patch | view | raw | blame | history
jimu.js/MapManager.js 18 ●●●●● patch | view | raw | blame | history
themes/FoldableTheme/widgets/HeaderController/Widget.js 2 ●●● patch | view | raw | blame | history
widgets/Basemap/Widget.js 189 ●●●●● patch | view | raw | blame | history
widgets/HawkEyeMap/Widget.html 2 ●●●●● patch | view | raw | blame | history
widgets/HawkEyeMap/Widget.js 56 ●●●●● patch | view | raw | blame | history
widgets/HawkEyeMap/css/style.css patch | view | raw | blame | history
widgets/HawkEyeMap/images/icon.png patch | view | raw | blame | history
widgets/HawkEyeMap/manifest.json 18 ●●●●● patch | view | raw | blame | history
widgets/HawkEyeMap/nls/es/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/HawkEyeMap/nls/strings.js 7 ●●●●● patch | view | raw | blame | history
widgets/HawkEyeMap/nls/zh-cn/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/MapSection/SectionChart.js 236 ●●●●● patch | view | raw | blame | history
widgets/MapSection/Widget.html 6 ●●●●● patch | view | raw | blame | history
widgets/MapSection/Widget.js 56 ●●●●● patch | view | raw | blame | history
widgets/MapSection/Widget1.js 276 ●●●●● patch | view | raw | blame | history
widgets/MapSection/css/style.css 70 ●●●●● patch | view | raw | blame | history
widgets/MapSection/images/icon.png patch | view | raw | blame | history
widgets/MapSection/manifest.json 18 ●●●●● patch | view | raw | blame | history
widgets/MapSection/nls/es/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/MapSection/nls/strings.js 7 ●●●●● patch | view | raw | blame | history
widgets/MapSection/nls/zh-cn/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/PathShow/Widget.js 37 ●●●●● patch | view | raw | blame | history
widgets/PathShow/nls/zh-cn/strings.js 2 ●●● patch | view | raw | blame | history
widgets/PictureAnimation/Widget.html 2 ●●●●● patch | view | raw | blame | history
widgets/PictureAnimation/Widget.js 64 ●●●●● patch | view | raw | blame | history
widgets/PictureAnimation/css/style.css patch | view | raw | blame | history
widgets/PictureAnimation/images/icon.png patch | view | raw | blame | history
widgets/PictureAnimation/manifest.json 18 ●●●●● patch | view | raw | blame | history
widgets/PictureAnimation/nls/es/strings.js 5 ●●●●● patch | view | raw | blame | history
widgets/PictureAnimation/nls/strings.js 7 ●●●●● patch | view | raw | blame | history
widgets/PictureAnimation/nls/zh-cn/strings.js 5 ●●●●● patch | view | raw | blame | history
config.json
@@ -267,6 +267,33 @@
    },
    "imageryProviderViewModels": [
      {
        "name": "天地图矢量",
        "tooltip": "天地图矢量",
        "iconUrl": "images/basemaps/tianditushiliang.png",
        "layers": [
          {
            "label": "天地图矢量",
            "type": "wmts",
            "url": "http://t0.tianditu.gov.cn/vec_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0",
            "layer": "vec",
            "style": "default",
            "format": "tiles",
            "tileMatrixSetID": "w",
            "maximumLevel": 17
          },
          {
            "label": "天地图矢量标注",
            "type": "wmts",
            "url": "http://t0.tianditu.gov.cn/cva_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0",
            "layer": "cva",
            "style": "default",
            "format": "tiles",
            "tileMatrixSetID": "w",
            "maximumLevel": 17
          }
        ]
      },
      {
        "name": "天地图影像",
        "tooltip": "天地图全球影像地图服务(国家测绘局)",
        "iconUrl": "images/basemaps/tiandituimage.png",
@@ -293,33 +320,6 @@
          }
        ]
      },
      {
        "name": "天地图矢量",
        "tooltip": "天地图矢量",
        "iconUrl": "images/basemaps/tianditushiliang.png",
        "layers": [
          {
            "label": "天地图矢量",
            "type": "wmts",
            "url": "http://t0.tianditu.gov.cn/vec_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0",
            "layer": "vec",
            "style": "default",
            "format": "tiles",
            "tileMatrixSetID": "w",
            "maximumLevel": 17
          },
          {
            "label": "天地图矢量标注",
            "type": "wmts",
            "url": "http://t0.tianditu.gov.cn/cva_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0",
            "layer": "cva",
            "style": "default",
            "format": "tiles",
            "tileMatrixSetID": "w",
            "maximumLevel": 17
          }
        ]
      },
      {
        "name": "离线影像",
        "tooltip": "赣州市离线影像",
@@ -440,8 +440,27 @@
    },
    "widgets": [
      {
        "name": "旅游路线",
        "name": "轨迹线",
        "uri": "widgets/PathShow/Widget"
      },
      {
        "name": "剖面分析",
        "uri": "widgets/MapSection/Widget",
        "position": {
          "left": 20,
          "top": 90,
          "width": "440px",
          "height": "320px",
          "relativeTo": "map"
        }
      },
      {
        "name": "鹰眼地图",
        "uri": "widgets/HawkEyeMap/Widget"
      },
      {
        "name": "图片动画",
        "uri": "widgets/PictureAnimation/Widget"
      }
    ],
    "groups": []
images/circle_bg.png
images/zhui.glb
Binary files differ
jimu.js/MapManager.js
@@ -96,22 +96,6 @@
                var imageryLayers = this.map.imageryLayers;
                imageryLayers.removeAll();
                var yinyan = new Cesium.WebMapTileServiceImageryProvider({
                    "label": "天地图影像",
                    "type": "wmts",
                    "url": "http://t0.tianditu.gov.cn/img_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0",
                    "layer": "img",
                    "style": "default",
                    "format": "tiles",
                    "tileMatrixSetID": "w",
                    "maximumLevel": 17
                });
                dcViewer.hawkeyeMap.enable = true
                dcViewer.hawkeyeMap.addBaseLayer(
                    yinyan
                )
                // // 罗盘
                // this.map.extend(Cesium.viewerCesiumNavigationMixin);
                // //当然也可以使用默认的
@@ -138,7 +122,7 @@
                //设置离线地图默认显示
                this.map.baseLayerPicker.viewModel.selectedImagery = this.map.baseLayerPicker.viewModel.imageryProviderViewModels[2];
                this.map.baseLayerPicker.viewModel.selectedImagery = this.map.baseLayerPicker.viewModel.imageryProviderViewModels[1];
                this.map.baseLayerPicker.viewModel.selectedTerrain = this.map.baseLayerPicker.viewModel.terrainProviderViewModels[2];
                $(".cesium-baseLayerPicker-sectionTitle").eq(0).html("底图");
                $(".cesium-baseLayerPicker-sectionTitle").eq(1).html("地形");
themes/FoldableTheme/widgets/HeaderController/Widget.js
@@ -737,7 +737,7 @@
                } else {
                    iconUrl = iconConfig.icon;
                }
                if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver' || iconConfig.name == "MapSection") {
                if (iconConfig.name == "AnalysisOfBarrierLake" || iconConfig.name == 'ThematicDynamicRiver') {
                    node = null;
                    return;
                } else {
widgets/Basemap/Widget.js
@@ -3,80 +3,125 @@
// 模块描述: 底图
///////////////////////////////////////////////////////////////////////////
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'
    ],
    function (declare,
        lang,
        array,
        html,
        topic,
        BaseWidget,
        aspect,
        string,
        utils
    ) {
        return declare([BaseWidget], {
            baseClass: 'jimu-widget-Basemap',
            name: 'Basemap',
            layers:{},
            startup: function () {
                // 暴露在外的接口
                topic.subscribe("closeMap", lang.hitch(this, this.closeBaseMap));
                this.inherited(arguments);
                $('.jimu-widget-Basemap span').click(function () {
                    topic.publish('closeTool', this.name);
                    topic.publish('closeZtree', this.name);
                    if ($('.cesium-baseLayerPicker-dropDown').hasClass('cesium-baseLayerPicker-dropDown-visible') == true) {
                        $('.cesium-baseLayerPicker-dropDown').removeClass('cesium-baseLayerPicker-dropDown-visible')
                    } else {
                        $('.cesium-baseLayerPicker-dropDown').addClass('cesium-baseLayerPicker-dropDown-visible')
                    }
                })
            },
            closeBaseMap: function (item) {
                if (item != this.name) {
                    if ($('.cesium-baseLayerPicker-dropDown').hasClass('cesium-baseLayerPicker-dropDown-visible') == true) {
                        $('.cesium-baseLayerPicker-dropDown').removeClass('cesium-baseLayerPicker-dropDown-visible')
                    }
    'dojo/_base/declare',
    'dojo/_base/lang',
    'dojo/_base/array',
    'dojo/_base/html',
    'dojo/topic',
    'dojo/on',
    'jimu/BaseWidget',
    'jimu/utils',
    'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
    'libs/zTree_v3/js/jquery.ztree.all'
],
function (declare,
    lang,
    array,
    html,
    topic,
    on,
    BaseWidget,
    aspect,
    string,
    utils
) {
    return declare([BaseWidget], {
        baseClass: 'jimu-widget-Basemap',
        name: 'Basemap',
        tileset:null,
        startup: function () {
            // 暴露在外的接口
            topic.subscribe("closeMap", lang.hitch(this, this.closeBaseMap));
            this.inherited(arguments);
            $(".cesium-baseLayerPicker-sectionTitle").eq(0).html("底图");
            $(".cesium-baseLayerPicker-sectionTitle").eq(1).html("地形");
            $('.jimu-widget-Basemap span').click(function () {
                topic.publish('closeTool', this.name);
                topic.publish('closeZtree', this.name);
                if ($('.cesium-baseLayerPicker-dropDown').hasClass('cesium-baseLayerPicker-dropDown-visible') == true) {
                    $('.cesium-baseLayerPicker-dropDown').removeClass('cesium-baseLayerPicker-dropDown-visible')
                } else {
                    $('.cesium-baseLayerPicker-dropDown').addClass('cesium-baseLayerPicker-dropDown-visible')
                }
            },
            });
            onOpen: function () {
                //面板打开的时候触发 (when open this panel trigger)
            },
            //加载3DTile
            this.tileset = this.map.scene.primitives.add(
                new Cesium.Cesium3DTileset({
                "url": "http://223.83.52.4:81/data/qx1/tileset.json",
                "maximumScreenSpaceError": 16,
                "preferLeaves":true,
                "maximumNumberOfLoadedTiles": 2000,
                "luminanceAtZenith": 0.8
            }));
            function zoomToTileset(tileset) {
                var cartographic = Cesium.Cartographic.fromCartesian(tileset.boundingSphere.center);
                var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height);
                var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height+10);
                var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
                tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
            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);
            }
            // tileset数据加载好后,便缩放相机视角
            this.tileset.readyPromise.then(zoomToTileset);
            var tit = dojo.query(".cesium-baseLayerPicker-sectionTitle")[1];
            html.create('div', {
                style:"font-size: 14px;margin-top: 3px;float: right;",
                innerHTML:"倾斜三维"
            }, tit);
        });
    });
            var qxNode = html.create('input', {
                style:"margin-top: 6px;margin-right: 5px;float: right;",
                type:"checkbox",
                checked:"checked"
            }, tit);
            on(qxNode, "click", lang.hitch(this, this._switchTile))
        },
        _switchTile: function () {
            if(this.tileset.show){
                this.tileset.show = false;
            }
            else{
                this.tileset.show = true;
            }
        },
        closeBaseMap: function (item) {
            if (item != this.name) {
                if ($('.cesium-baseLayerPicker-dropDown').hasClass('cesium-baseLayerPicker-dropDown-visible') == true) {
                    $('.cesium-baseLayerPicker-dropDown').removeClass('cesium-baseLayerPicker-dropDown-visible')
                }
            }
        },
        onOpen: function () {
            //面板打开的时候触发 (when open this panel trigger)
        },
        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/HawkEyeMap/Widget.html
New file
@@ -0,0 +1,2 @@
<div>
</div>
widgets/HawkEyeMap/Widget.js
New file
@@ -0,0 +1,56 @@
///////////////////////////////////////////////////////////////////////////
// Copyright © 2018 NarutoGIS. All Rights Reserved.
// 模块描述:鹰眼地图
///////////////////////////////////////////////////////////////////////////
define([
    "dojo/_base/declare",
    "dojo/_base/lang",
    'dojo/_base/html',
    "dojo/_base/fx",
    'jimu/BaseWidget',
    "dojo/topic",
    "dojo/Deferred",
    "dojo/on",
    'jimu/dijit/Popup'
], function (
    declare,
    lang,
    html,
    fx,
    BaseWidget,
    topic,
    Deferred,
    on,
    Popup
) {
    return declare([BaseWidget], {
        baseClass: "demo-widgets-HawkEyeMap",
        destroy: function () {
            this.inherited(arguments);
        },
        onOpen: function () {
            $("#dc-hawkeye-map").show();
            var yinyan = new Cesium.WebMapTileServiceImageryProvider({
                "label": "天地图影像",
                "type": "wmts",
                "url": "http://t0.tianditu.gov.cn/img_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0",
                "layer": "img",
                "style": "default",
                "format": "tiles",
                "tileMatrixSetID": "w",
                "maximumLevel": 17
            });
            window.dcViewer.hawkeyeMap.enable = true
            window.dcViewer.hawkeyeMap.addBaseLayer(
                yinyan
            )
        },
        onClose: function () {
            $("#dc-hawkeye-map").hide();
        },
        startup: function () {
        },
    });
});
widgets/HawkEyeMap/css/style.css
widgets/HawkEyeMap/images/icon.png
widgets/HawkEyeMap/manifest.json
New file
@@ -0,0 +1,18 @@
{
  "name": "HawkEyeMap",
  "2D": true,
  "3D": true,
  "platform": "HTML",
  "version": "2.10",
  "wabVersion": "2.10",
  "author": "NarutoGIS",
  "description": "",
  "copyright": "",
  "license": "",
  "properties": {
    "inPanel": false,
    "hasUIFile": true,
    "hasConfig": false,
    "supportMultiInstance": false
  }
}
widgets/HawkEyeMap/nls/es/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "HawkEyeMap"
  })
);
widgets/HawkEyeMap/nls/strings.js
New file
@@ -0,0 +1,7 @@
define({
  root: ({
    _widgetLabel: "HawkEyeMap"
  }),
  "es": 1,
  "zh-cn": 1
});
widgets/HawkEyeMap/nls/zh-cn/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "鹰眼地图"
  })
);
widgets/MapSection/SectionChart.js
New file
@@ -0,0 +1,236 @@
define([
        'dojo/_base/declare',
        'dojo/_base/lang',
        'dojo/_base/html',
        'dijit/_WidgetBase',
        'dijit/_TemplatedMixin',
        'dojo/on',
        'dojo/mouse',
        'dojo/query',
        'dojo/request/xhr',
        'dojo/topic',
        'dojo/json',
        "dojo/dom-construct",
        "libs/echarts/v4/echarts.min"
    ],
    function (declare, lang, html, _WidgetBase, _TemplatedMixin,
              on, mouse, query, xhr, topic, JSON,domConstruct,echarts) {
        return declare([_WidgetBase, _TemplatedMixin], {
            templateString: '<div style="width:100%;height:100%;"><div   style="width:100%;height:100%;" >' +
            '<div data-dojo-attach-point="boxNode" style="width:100%;height:285px;border-top:0px solid #caccdd" ></div>' +
            '<a data-dojo-attach-point="down" download="downlaod.csv"   style="position:absolute;right:10px;top:0;height:30px;border-top:0px solid #caccdd" >下载数据</a>' +
            '</div>' +
            '</div>',
            constructor: function (options, dom) {
            },
            Rad:function(d){
                 return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。
            },
            //计算距离,参数分别为第一点的纬度,经度;第二点的纬度,经度
            GetDistance:function(lat1,lng1,lat2,lng2){
                 var radLat1 = this.Rad(lat1);
                 var radLat2 = this.Rad(lat2);
                 var a = radLat1 - radLat2;
                 var  b = this.Rad(lng1) - this.Rad(lng2);
                 var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) +
                 Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
                 s = s *6378.137 ;// EARTH_RADIUS;
                 s = Math.round(s * 10000) / 10000; //输出为公里
                 return s;
            },
            modifyT:function(number,level){
                level = level||1;
                try{
                    //判断正数负数
                    number = number.toString().replace(/\$|\,/g, '');
                    if (isNaN(number)){
                        number = "0";
                    }
                }catch(e){
                    return '';
                }
                var sign = (number == (number = Math.abs(number)));
                //返回的是K M G T
                var valInfo = null;
                if (number != null && typeof(number) != "undefined") {
                    var numInput = parseFloat(number);
                    valInfo = numInput/level;
                } else {
                    return '';
                }
                if(valInfo>0&&valInfo<1){//小数
                    valInfo = valInfo.toPrecision(2);
                }else{//大于1
                    if(valInfo>=1&&valInfo<100){
                        valInfo = Number(valInfo.toPrecision(3));
                    }else if(valInfo>=100&&valInfo<=1000){
                        valInfo = Number(valInfo.toPrecision(3));
                    }else {
                        valInfo = (valInfo+"");
                        valInfo = valInfo.split(".")[0];
                    }
                }
                return  (sign?"":"-")+valInfo+"";
            },
            isResize:true,
            postCreate: function () {
                this.inherited(arguments);
                this.query();
                this.step = 0;
                var lg = this.GetDistance(this.oList[0].lttd,this.oList[0].lgtd,this.oList[99].lttd,this.oList[99].lgtd);
                this.step = lg/99;
                this.step = Number(this.modifyT(this.step));
                var str = "";
                var sumDyp = 0;
                   for(var k=0;k<this.oList.length;k++){
                     var item =  this.oList[k];
                     if(k==0){
                        str+= "0,"+item.lgtd+","+item.lttd+","+item.height+"\n";
                     }else{
                        sumDyp+=this.step;
                        str+= this.modifyT(sumDyp)+","+item.lgtd+","+item.lttd+","+item.height+"\n";
                     }
                   }
               str =  encodeURIComponent(str);
               this.down.href = "data:text/csv;charset=utf-8,\ufeff"+str;
            },
            query: function () {
                setTimeout(lang.hitch(this,function(){
                    this.createEChart(this.list);
                }),1000);
            },
            startup: function () {
                this.inherited(arguments);
            },
            createEChart: function (list) {
                domConstruct.empty(this.boxNode);//清空子节点
                if (list.length>0){
                }else{
                    domConstruct.empty(this.boxNode);
                    var content = "暂无相关站点数据";
                    var label2 = html.create('div', {
                        'class': 'paddCenter',
                        innerHTML: content
                    }, this.boxNode);
                    return;
                }
                var ids = [];
                var heights = [];
                var sumDyp = 0;
                var index = 1;
                for (var i = 2; i < list.length; i++) {
                    var item = list[i];
                    heights.push(item.toFixed(2));
                    if(i==2){
                         ids.push(0);
                    }else{
                         sumDyp+=this.step;
                         ids.push(this.modifyT(sumDyp));
                    }
                    i++;
                    i++;
                    index++;
                }
                // 基于准备好的dom,初始化echarts图表
                var myChart = echarts.init(this.boxNode);
                var option = {
                    title: {
                        x:"center",
                        text: "剖面图(m)",
                        textStyle:{
                            fontSize: 14,
                            fontWeight: 'bolder',
                            color:'gray'
                        },
                        subtextStyle:{
                            fontSize: 10
                        }
                    },
                    tooltip: {
                        trigger: 'axis'
                    },
                    dataZoom: {
                        show: false,
                        realtime: false,//true为拖动的时候就变化
                        start: 0,
                        end: 100//设置成整体样式的某个位置
                    },
                    grid:{
                        y2:25,y:25,x2:50,x:50
                    },
                    toolbox: {
                        show:false,
                        feature: {
                            mark : {show: true},
                            dataView : {show: true, readOnly: false},
                            magicType : {show: true, type: ['line', 'bar']},
                            restore : {show: true},
                            saveAsImage: {show: true}
                        }
                    },
                    calculable: true,
                    xAxis: [
                        {
                            type: 'category',
                            data: ids,
                            name: 'km'
                        }
                    ],
                    yAxis : {
                        type: 'value',
                        scale:true,
                        boundaryGap: [0, '100%']
                    },
                    series: [
                        {
                            name:'高程',
                            type:'line',
                            smooth:true,
                            symbol: 'none',
                            itemStyle: {
                                normal: {
                                    color: 'rgb(255, 70, 131)'
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgb(255, 158, 68)'
                                    }, {
                                        offset: 1,
                                        color: 'rgb(255, 70, 131)'
                                    }])
                                }
                            },
                            data: heights
                        }
                    ]
                };
                myChart.setOption(option);
            }
        });
    });
widgets/MapSection/Widget.html
New file
@@ -0,0 +1,6 @@
<div>
    <!-- <a class="fa fa-area-chart" style="    padding: 4px;
    cursor: pointer;
    font-size: 19px;
    color: white;" title="获取剖面图" data-dojo-attach-event="click:click"></a> -->
</div>
widgets/MapSection/Widget.js
New file
@@ -0,0 +1,56 @@
///////////////////////////////////////////////////////////////////////////
// Copyright © 2018 NarutoGIS. All Rights Reserved.
// 模块描述:获取两点间地形剖面
///////////////////////////////////////////////////////////////////////////
define([
    "dojo/_base/declare",
    "dojo/_base/lang",
    'dojo/_base/html',
    "dojo/_base/fx",
    'jimu/BaseWidget',
    "dojo/topic",
    "dojo/Deferred",
    "dojo/on",
    'jimu/dijit/Popup',
    "./SectionChart"
],function(
    declare,
    lang,
    html,
    fx,
    BaseWidget,
    topic,
    Deferred,
    on,
    Popup,
    SectionChart
){
    return declare("MapSection", [BaseWidget],{
        baseClass:"demo-widgets-MapSection",
        destroy:function(){
            this.inherited(arguments);
        },
        onOpen: function () {
            this.map.scene.globe.baseColor = Cesium.Color.BLACK;
            $($('div.cesium-viewer').find('.cesium-baseLayerPicker-choices')[0]).children('div:eq(3)').trigger('click');
            this.active = true;
        },
        onClose: function () {
            this.active = false;
            this.clearEntity();
            this._tooltip.setVisible(false);
            },
        startup:function(){
            this.inherited(arguments);
            var pm = new DC.mapSection(window.dcViewer,Popup,SectionChart);
        },
        clearEntity: function () {
            window.viewer.entities.remove(this.bill1);
            window.viewer.entities.remove(this.bill2);
            window.viewer.entities.remove(this.line);
        },
    });
});
widgets/MapSection/Widget1.js
New file
@@ -0,0 +1,276 @@
///////////////////////////////////////////////////////////////////////////
// Copyright © 2018 NarutoGIS. All Rights Reserved.
// 模块描述:获取两点间地形剖面
///////////////////////////////////////////////////////////////////////////
define([
    "dojo/_base/declare",
    "dojo/_base/lang",
    'dojo/_base/html',
    "dojo/_base/fx",
    'jimu/BaseWidget',
    "dojo/topic",
    "dojo/Deferred",
    "dojo/on",
    'jimu/dijit/Popup',
    "./SectionChart"
], function (
    declare,
    lang,
    html,
    fx,
    BaseWidget,
    topic,
    Deferred,
    on,
    Popup,
    SectionChart
) {
    return declare("MapSection", [BaseWidget], {
        baseClass: "demo-widgets-MapSection",
        postCreate: function () {
            this.inherited(arguments);
            this._tooltip = this.createTooltip(this.map.cesiumWidget.container);
        },
        createTooltip: function (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;
                // add to frame div and display coordinates
                frameDiv.appendChild(div);
            }
            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";
                }
            }
            return new tooltip(frameDiv);
        },
        destroy: function () {
            this.inherited(arguments);
        },
        // click:function(){
        //     this.active = !this.active;
        //     if(this.active){
        //         this._tooltip.setVisible(true);
        //     }else{
        //         this._tooltip.setVisible(false);
        //     }
        //     this.clearEntity();
        // },
        onOpen: function () {
            this.map.scene.globe.baseColor = Cesium.Color.BLACK;
            $($('div.cesium-viewer').find('.cesium-baseLayerPicker-choices')[0]).children('div:eq(3)').trigger('click');
            this.active = true;
            this.clearEntity();
            this._tooltip.setVisible(true);
        },
        onClose: function () {
            this.active = false;
            this.clearEntity();
            this._tooltip.setVisible(false);
        },
        active: false,
        startup: function () {
            this.inherited(arguments);
            var handler = new Cesium.ScreenSpaceEventHandler(window.viewer.scene.canvas);
            handler.setInputAction(
                lang.hitch(this, function (movement) {
                    if (!this.active) return;
                    var ellipsoid = window.viewer.scene.globe.ellipsoid;
                    var ellipsoid = Cesium.Ellipsoid.WGS84;
//                    var cartesian = window.viewer.scene.camera.pickEllipsoid(movement.position, ellipsoid);//两种的经纬度获取的不一样
                    var pickRay = window.viewer.scene.camera.getPickRay(movement.position);
                    var cartesian = window.viewer.scene.globe.pick(pickRay, window.viewer.scene);
                    if (cartesian) {
                        var cartographic = ellipsoid.cartesianToCartographic(cartesian);
                        var longitudeString = Cesium.Math.toDegrees(cartographic.longitude);//.toFixed(2);
                        var latitudeString = Cesium.Math.toDegrees(cartographic.latitude);//.toFixed(2);
                        this.points.push({"lgtd": longitudeString, "lttd": latitudeString});
                        if (this.points.length == 2) {
                            //计算
                            var points = this.createHundryPoints(this.points);
                            //弹出
                            this.getData(points);
                            this.points = [];
                            this.active = false;
                            this._tooltip.setVisible(false);
                            this.bill2 = window.viewer.entities.add({
                                position: Cesium.Cartesian3.fromDegrees(longitudeString, latitudeString),
                                billboard: {
                                    image: "images/marker_green.png",
                                    pixelOffset: new Cesium.Cartesian2(0, 0),
                                    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                                    disableDepthTestDistance: Number.POSITIVE_INFINITY
                                }
                            });
                            return;
                        }
                        this.bill1 = window.viewer.entities.add({
                            position: Cesium.Cartesian3.fromDegrees(longitudeString, latitudeString),
                            billboard: {
                                image: "images/marker_green.png",
                                pixelOffset: new Cesium.Cartesian2(0, 0),
                                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                                disableDepthTestDistance: Number.POSITIVE_INFINITY
                            }
                        });
                    }
                }), Cesium.ScreenSpaceEventType.LEFT_CLICK);
            handler.setInputAction(
                lang.hitch(this, function (movement) {
                    if (!this.active) return;
                    if (this.points.length == 0) {
                        this._tooltip.showAt(movement.endPosition, "请获取起点");
                        return;
                    }
                    this._tooltip.showAt(movement.endPosition, "点击结束");
                }), Cesium.ScreenSpaceEventType.MOUSE_MOVE);
        },
        clearEntity: function () {
            window.viewer.entities.remove(this.bill1);
            window.viewer.entities.remove(this.bill2);
            window.viewer.entities.remove(this.line);
        },
        createHundryPoints: function (list) {
            var lgtd1 = list[0].lgtd;
            var lgtd100 = list[1].lgtd;
            var lgtdStep = (lgtd100 - lgtd1) / 1000;
            var lttd1 = list[0].lttd;
            var lttd100 = list[1].lttd;
            var lttdStep = (lttd100 - lttd1) / 1000;
            var ary = [];
            for (var i = 0; i < 1000; i++) {
                var lgtd = lgtd1 + (lgtdStep * i);
                var lttd = lttd1 + (lttdStep * i);
                ary.push({"id": i, "lgtd": lgtd, "lttd": lttd});
            }
            return ary;
        },
        points: [],
        getData: function (ary) {
            var mappints = [];
            for (var j = 0; j < ary.length; j++) {
                var pt = ary[j];
                mappints.push({lgtd: pt.lgtd, lttd: pt.lttd, height: 0});
            }
            //获取高程去
            var datas = mappints;
            var tIds = [];
            var pos = [];
            for (var i = 0; i < datas.length; i++) {
                var item = datas[i];
                tIds.push(item.id);
                pos.push(Cesium.Cartographic.fromDegrees(item.lgtd, item.lttd));
            }
            Cesium.sampleTerrain(window.viewer.terrainProvider, 9, pos).then(function (pos) {//去获取高程
                for (var i = 0; i < tIds.length; i++) {
                    datas[i].height = pos[i].height;
                }
                var list = datas;
                var ptsAry = [];
                var numbers_lgtd = [];
                var numbers_lttd = [];
                for (var j = 0; j < list.length; j++) {
                    var pt = list[j];
                    ptsAry.push(Number(pt.lgtd));
                    ptsAry.push(Number(pt.lttd));
                    ptsAry.push(Number(pt.height));
                    numbers_lgtd.push(Number(pt.lgtd));
                    numbers_lttd.push(Number(pt.lttd));
                }
                this.line = window.viewer.entities.add({
                    polyline: {
                        positions: Cesium.Cartesian3.fromDegreesArrayHeights(ptsAry),
                        width: 3,
                        material: new Cesium.PolylineOutlineMaterialProperty({
                            color: Cesium.Color.ORANGE,
                            outlineWidth: 1,
                            outlineColor: Cesium.Color.BLACK
                        }),
                        clampToGround: true
                    }
                });
                var panel = new SectionChart({list: ptsAry, oList: list});
                new Popup({
                    content: panel,
                    titleLabel: "地形剖面图",
                    width: 650,
                    height: 370,
                    buttons: [],
                    onClose: lang.hitch(this, function () {
                        return true;
                    })
                });
            });
        },
        makeChange: function (datas) {
            var datas = datas;
            var def = new Deferred();
            var tIds = [];
            var pos = [];
            for (var i = 0; i < datas.length; i++) {
                var item = datas[i];
                tIds.push(item.id);
                pos.push(Cesium.Cartographic.fromDegrees(item.lgtd, item.lttd));
            }
            Cesium.sampleTerrain(window.viewer.terrainProvider, 9, pos).then(function (pos) {//去获取高程
                for (var i = 0; i < tIds.length; i++) {
                    datas[i].height = pos[i].height;
                }
                def.resolve(datas);
            });
            return def;
        }
    });
});
widgets/MapSection/css/style.css
New file
@@ -0,0 +1,70 @@
.demo-widgets-MapSection {
  width: 0!important;
  height: 0 !important;
  margin:2px;
  background: #303336;
  border: 1px solid #444;
  text-align: center;
  border-radius: 4px;
  padding: 1px;
}
.jimu-popup .title {
  position: absolute;
  top: 0;
  left: -10px;
  width: 100%;
  background: #094895;
  color: #fff;
}
.twipsy {
  display: block;
  position: absolute;
  visibility: visible;
  max-width: 200px;
  min-width: 100px;
  padding: 5px;
  font-size: 11px;
  z-index: 1000;
  opacity: 0.8;
  -khtml-opacity: 0.8;
  -moz-opacity: 0.8;
  filter: alpha(opacity=80);
}
.twipsy.left .twipsy-arrow {
  top: 50%;
  right: 0;
  margin-top: -5px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid #000000;
}
.twipsy.right .twipsy-arrow {
  top: 50%;
  left: 0;
  margin-top: -5px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #000000;
}
.twipsy-inner {
  padding: 3px 8px;
  background-color: #000000;
  color: white;
  text-align: center;
  max-width: 200px;
  text-decoration: none;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}
.twipsy-arrow {
  position: absolute;
  width: 0;
  height: 0;
}
widgets/MapSection/images/icon.png
widgets/MapSection/manifest.json
New file
@@ -0,0 +1,18 @@
{
  "name": "MapSection",
  "2D": true,
  "3D": true,
  "platform": "HTML",
  "version": "2.10",
  "wabVersion": "2.10",
  "author": "NarutoGIS",
  "description": "",
  "copyright": "",
  "license": "",
  "properties": {
    "inPanel": false,
    "hasUIFile": true,
    "hasConfig": false,
    "supportMultiInstance": false
  }
}
widgets/MapSection/nls/es/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "MapSection"
  })
);
widgets/MapSection/nls/strings.js
New file
@@ -0,0 +1,7 @@
define({
  root: ({
    _widgetLabel: "MapSection"
  }),
  "es": 1,
  "zh-cn": 1
});
widgets/MapSection/nls/zh-cn/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "剖面分析"
  })
);
widgets/PathShow/Widget.js
@@ -127,7 +127,6 @@
                    });
                    //清除地图点
                    self.map.entities.removeAll();
@@ -142,14 +141,13 @@
                                if (res.features[i].attributes.Name == selectItem) {
                                    self.addLines(res.features[i]);
                                    self.map.camera.flyTo({
                                        destination: Cesium.Cartesian3.fromDegrees(res.features[i].attributes.x,res.features[i].attributes.y, res.features[i].attributes.height)
                                        destination: Cesium.Cartesian3.fromDegrees(res.features[i].attributes.x, res.features[i].attributes.y, res.features[i].attributes.height)
                                    });
                                }
                            }
                        }
                    });
                });
@@ -204,16 +202,16 @@
                var self = this;
                if (self.polyline != null){
                if (self.polyline != null) {
                    self.layer.remove(self.polyline);
                }
                var positions ='';
                var positions = '';
                for (var i = 0; i < res.length; i++) {
                    if(i != res.length - 1){
                        positions += res[i][0] + ',' +res[i][1] + ';';
                    }else{
                        positions += res[i][0] + ',' +res[i][1];
                    if (i != res.length - 1) {
                        positions += res[i][0] + ',' + res[i][1] + ';';
                    } else {
                        positions += res[i][0] + ',' + res[i][1];
                    }
                }
@@ -224,17 +222,32 @@
                self.polyline = new DC.Polyline(positions);
                //let polyline = new DC.Polyline("115.70683949300007,28.80868520100006;115.70593267000004,28.80891538000003;115.70573287000002,28.809185460000037;115.7057028700001,28.809355380000056;115.70575282000004,28.809495260000062;115.70592263000003,28.809634940000024;115.70629213000007,28.80977433000004;115.70646180000006,28.809953920000055;115.70678137000004,28.810113400000034;115.70741052000005,28.810772090000057;115.70783996000011,28.81156093000004;115.70788980000009,28.811910580000074;115.70778984000003,28.81311990000006;115.7079396800001,28.81314966000008;115.70895838000001,28.813328150000075;115.70968745000005,28.813437160000035;115.71056640000006,28.813515900000027;115.71211457000004,28.81349400000005;115.71248412000011,28.813423560000047;115.71356299000001,28.813042490000043;115.71410242000002,28.812881970000035;115.71435212000006,28.812811690000046;115.71552091000001,28.812470510000026;115.71587055000009,28.812370180000073;115.71622027000001,28.81221990000006;115.71666985000002,28.811819650000075;115.71668980000004,28.811809640000035;115.71701948000009,28.811619350000058;115.71729922000009,28.81149915000003;115.71731926000007,28.811489150000057;115.71758895000005,28.811418890000027;115.71838819000004,28.81134804000004;115.71859801000005,28.811267860000044;115.7187678900001,28.811157740000056;115.71946731000003,28.81055734000006;115.71984702000009,28.81017722000007;115.72001692000003,28.809747300000026;115.72008691000008,28.809467510000047;115.72006693000003,28.809317560000068;115.72000694000008,28.80918777000005;115.7198670900001,28.809038000000044;115.71907790000012,28.808179460000076;115.71879820000004,28.80783009000004;115.71871824000004,28.807660240000075;115.71860836000008,28.80728062000003;115.71859843000004,28.807120740000073;115.71869836000008,28.806770940000035;115.71881536700005,28.806550792000053;115.71894816000008,28.80630094000003;115.71915807000005,28.80567121000007;115.71925796000005,28.80553117000005;115.71940780000011,28.805451090000076;115.72030710000001,28.805300190000025;115.72103645000004,28.805229420000046;115.72123626000007,28.80516932000006;115.72134625000001,28.805079200000023;115.72156602000007,28.804779190000033;115.7217059300001,28.804679170000043;115.72225551000008,28.80450865000006;115.72320486000001,28.80404806000007;115.72342470000001,28.804017860000044;115.72391438000011,28.80403733000003;115.72426408000001,28.803947030000074;115.72452390000001,28.803766950000067;115.72493368000005,28.803176980000046;115.72513363000007,28.80298688000005;115.72583321000002,28.80253657000003;115.72608304000005,28.802416410000035;115.72626292000007,28.802356260000067;115.72643281,28.802356090000046;115.72693254,28.80244558000004;115.72741227000006,28.802365250000037;115.72759209000003,28.80233510000005;115.72870154000009,28.802134210000077;115.72962110000003,28.801933620000057;115.73037078000004,28.80144333000004;115.73158032000003,28.80097268000003;115.73205015000008,28.800882390000027;115.7322700200001,28.80087227000007;115.7324500100001,28.800912100000062;115.73267991000012,28.801021840000033;115.73337961000004,28.80142107000006;115.73388942000008,28.801770480000073;115.7344391900001,28.80217981000004;115.7349390600001,28.802559170000052;115.7359787900001,28.803327960000047;115.73613875000001,28.80344776000004;115.7366385900001,28.80381717000006;115.73701844000004,28.803946910000036;115.73723843000005,28.803946790000055;115.73845828000003,28.80362634000005;115.73986818000003,28.803235920000077;115.74010815000008,28.803205810000065;115.74106817000006,28.803275350000035;115.74139818000003,28.803255240000055;115.74156817000005,28.803215150000028;115.74191813000004,28.80301516000003;115.74209823000001,28.80280528000003;115.74323836000008,28.800946260000046;115.74335838000002,28.800756360000037;115.74387855000009,28.799886810000032;115.7447387200001,28.798647450000033;115.74487875000011,28.79846757000007;115.74506881000002,28.798157710000055;115.74521883000011,28.79782797000007;115.74530890000005,28.79763808000007;115.74549890000003,28.79731828000007;115.74578899000005,28.79697839000005;115.74626911000007,28.796598610000046;115.74686931000008,28.796188820000054;115.74706933000004,28.795998890000078;115.74827974000004,28.794559780000043;115.74838983000006,28.794419880000078;115.74890002000006,28.793790280000053;115.74915008000005,28.793570420000037;115.74967030000005,28.793280620000075;115.75012047000007,28.79313078000007;115.75207125000009,28.792571260000045;115.75314176000006,28.792241560000036;115.75325184000008,28.792211630000054;115.75341192000008,28.79216167000004;115.75361198000007,28.792101770000045;115.75579329000004,28.791432710000038;115.7555131900001,28.790403320000053;115.75551322000001,28.790063580000037;115.75561325000001,28.789374140000064;115.75563340000008,28.788694640000074;115.75501319000011,28.78659594000004;115.75482304000002,28.78599638000003;115.75476308000009,28.785806500000035;115.7546430000001,28.78552663000005;115.75440289000005,28.785016970000072;115.75422287000004,28.784637160000045;115.7538727000001,28.783957600000065;115.75386271000002,28.78376774000003;115.75393281000004,28.78362782000005;115.75398282000003,28.783567920000053;115.75413292000007,28.78332811000007;115.75420295000004,28.78313821000006;115.7541829700001,28.782898440000054;115.7540829400001,28.782688500000063;115.75389286000006,28.782498660000044;115.75361270000008,28.782398640000054;115.75332257000002,28.78240864000003;115.75297239000008,28.782558420000043;115.7527922700001,28.782538430000045;115.75268227000004,28.782458490000067;115.75257223000006,28.78228856000004;115.75252218000003,28.782108750000077;115.75240221000001,28.781239330000062;115.75237225000001,28.780899560000023;115.75237219000007,28.78062974000005;115.75241223000012,28.780459850000057;115.75258239000004,28.77994022000007;115.7526224400001,28.77971038000004;115.75261238000007,28.77961049000004;115.75256236000007,28.779510540000047;115.7524023200001,28.779370640000025;115.75232229000005,28.77920073000007;115.75234228000011,28.779070820000072;115.75251243000002,28.77870112000005;115.75251247000006,28.77861112000005;115.7524424400001,28.77846123000006;115.7523323900001,28.77822144000004;115.75233234000007,28.77811151000003;115.75258249000001,28.777721830000075;115.7528726600001,28.777451980000023;115.75308279000001,28.777312160000065;115.75326289000009,28.777142250000054;115.75332293000008,28.776982390000057;115.7533329800001,28.776832530000036;115.75320290000002,28.776472700000056;115.75304285000004,28.775793220000025;115.75294287000008,28.775513360000048;115.75257270000009,28.77492372000006;115.75239261000002,28.774723830000028;115.75211250000007,28.774503990000028;115.75100210000005,28.773794390000035;115.7506920400001,28.77345457000007;115.75025181000001,28.773034860000053;115.74997181000003,28.772695140000053;115.74944168000002,28.77184567000006;115.7489215700001,28.771056230000056;115.74857146000011,28.77035679000005;115.74819142000001,28.769447370000023;115.74808136000001,28.769227560000047;115.74800141000003,28.76908769000005;115.74774131000004,28.76885788000004;115.7470811500001,28.768448240000055;115.74674110000001,28.768158450000044;115.74665116000006,28.768008550000047;115.74654109000005,28.767638800000043;115.74612108000008,28.76665956000005;115.74578113000007,28.765670270000044;115.74542108000003,28.765190700000062;115.7452910400001,28.76495091000004;115.74501110000006,28.764091490000055;115.74488110000004,28.76371178000005;115.74484109000002,28.76364190000004;115.74467106000009,28.763382080000042;115.74444101000006,28.76316225000005;115.74420107000003,28.762972450000063;115.74376100000006,28.76255289000005;115.74372361400003,28.76250723900006;115.74313097000004,28.761783580000042;115.74296104000007,28.76159376000004;115.7426710200001,28.761184100000037;115.74245099000007,28.760854390000077;115.74241100000006,28.760784510000065;115.74233100000004,28.760634610000068;115.74214104000009,28.760304940000026;115.74200107000001,28.76006509000007;115.7417010800001,28.759595510000054;115.7414710700001,28.759075950000067;115.74134110000011,28.75898612000003;115.74111110000001,28.758906230000036;115.74063113000011,28.75879653000004;115.74046118000001,28.75873658000006;115.74037120000003,28.758666670000025;115.74008120000008,28.758327080000072;115.7394612600001,28.757817660000057;115.73921131000009,28.75756800000005;115.73915134000003,28.757438120000074;115.73915134000003,28.757308200000068;115.7392013000001,28.757128280000074;115.73939136000001,28.756708440000068;115.73946132000003,28.756588470000054;115.7396813900001,28.75624866000004;115.74004134000006,28.75593870000006;115.7400713400001,28.755878720000055;115.74006136000003,28.755768790000047;115.73997142000007,28.755628890000025;115.7396914200001,28.755329250000045;115.73959142000001,28.755079460000047;115.73955150000006,28.754849630000024;115.73955147000004,28.754569840000045;115.73969154000008,28.754070090000027;115.73972150000009,28.753860170000053;115.73969155000009,28.753730310000037;115.73963150000009,28.75365037000006;115.73916163000001,28.753140940000037;115.73915162000003,28.753100950000032;115.73886169000002,28.75281134000005;115.73876168000004,28.75243162000004;115.73877174000006,28.752311690000056;115.73878173000003,28.752111850000063;115.73887171000001,28.751662080000074;115.73913181000012,28.750912430000028;115.73914178000007,28.750792500000045;115.73920183000007,28.750052960000062;115.73917187000006,28.74962325000007;115.7392119000001,28.74934348000005;115.7394419100001,28.748533890000033;115.73943198000006,28.747894280000025;115.73935201000006,28.747564580000073;115.73912209000002,28.746865120000052;115.73893212000007,28.74648546000003;115.7387322300001,28.746155830000077;115.73842227000011,28.745486370000037;115.73787241000002,28.744317430000024;115.73768252000002,28.744057760000032;115.73747260000005,28.743598140000074;115.73737256000004,28.743388320000065;115.73692274000007,28.74265907000006;115.73686272000009,28.742469280000023;115.7368828000001,28.74231934000005;115.73686278000002,28.742149470000")
                self.polyline.setStyle({
                    width: 10,
                    material: new DC.PolylineImageTrailMaterialProperty({
                        speed: 20,
                        image: './images/arrow.png',
                        repeat: { x: 40, y: 1 }
                        repeat: {x: 40, y: 1}
                    }),
                    clampToGround: true
                });
                self.layer.addOverlay(self.polyline);
                let position = new DC.Position(115.70683949300007, 28.80868520100006);
                let circle = new DC.Circle(position, 2000)
                circle.setStyle({
                    material: new DC.ImageMaterialProperty({
                        image: './images/circle_bg.png'
                    })
                })
                circle.rotateAmount = 0.01
                let model = new DC.Model(position, './images/zhui.glb')
                model.setStyle({
                    scale: 100
                })
                model.rotateAmount = 4
                self.layer.addOverlay(model).addOverlay(circle)
            },
            addPoint: function (res) {
@@ -243,7 +256,7 @@
                var self = this;
                for (var i = 0; i < result.length; i++) {
                    var imgs = "";
widgets/PathShow/nls/zh-cn/strings.js
@@ -1,5 +1,5 @@
define(
   ({
    _widgetLabel: "旅游路线"
    _widgetLabel: "轨迹线"
  })
);
widgets/PictureAnimation/Widget.html
New file
@@ -0,0 +1,2 @@
<div>
</div>
widgets/PictureAnimation/Widget.js
New file
@@ -0,0 +1,64 @@
///////////////////////////////////////////////////////////////////////////
// Copyright © 2018 NarutoGIS. All Rights Reserved.
// 模块描述:鹰眼地图
///////////////////////////////////////////////////////////////////////////
define([
    "dojo/_base/declare",
    "dojo/_base/lang",
    'dojo/_base/html',
    "dojo/_base/fx",
    'jimu/BaseWidget',
    "dojo/topic",
    "dojo/Deferred",
    "dojo/on",
    'jimu/dijit/Popup'
], function (
    declare,
    lang,
    html,
    fx,
    BaseWidget,
    topic,
    Deferred,
    on,
    Popup
) {
    return declare([BaseWidget], {
        baseClass: "demo-widgets-PictureAnimation",
        destroy: function () {
            this.inherited(arguments);
        },
        onOpen: function () {
            var self = this;
            self.layer = new DC.VectorLayer('layer')
            window.dcViewer.addLayer(self.layer)
            let position = new DC.Position(115.70683949300007, 28.80868520100006);
            let circle = new DC.Circle(position, 2000)
            circle.setStyle({
                material: new DC.ImageMaterialProperty({
                    image: './images/circle_bg.png'
                })
            })
            circle.rotateAmount = 0.01
            let model = new DC.Model(position, './images/zhui.glb')
            model.setStyle({
                scale: 100
            })
            model.rotateAmount = 4
            self.layer.addOverlay(model).addOverlay(circle)
            self.map.camera.flyTo({
                destination: Cesium.Cartesian3.fromDegrees(115.70683949300007,28.80868520100006, 3000)
            });
        },
        onClose: function () {
        },
        startup: function () {
        },
    });
});
widgets/PictureAnimation/css/style.css
widgets/PictureAnimation/images/icon.png
widgets/PictureAnimation/manifest.json
New file
@@ -0,0 +1,18 @@
{
  "name": "PictureAnimation",
  "2D": true,
  "3D": true,
  "platform": "HTML",
  "version": "2.10",
  "wabVersion": "2.10",
  "author": "NarutoGIS",
  "description": "",
  "copyright": "",
  "license": "",
  "properties": {
    "inPanel": false,
    "hasUIFile": true,
    "hasConfig": false,
    "supportMultiInstance": false
  }
}
widgets/PictureAnimation/nls/es/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "PictureAnimation"
  })
);
widgets/PictureAnimation/nls/strings.js
New file
@@ -0,0 +1,7 @@
define({
  root: ({
    _widgetLabel: "PictureAnimation"
  }),
  "es": 1,
  "zh-cn": 1
});
widgets/PictureAnimation/nls/zh-cn/strings.js
New file
@@ -0,0 +1,5 @@
define(
   ({
    _widgetLabel: "图片动画"
  })
);