5 files modified
15 files added
1 files deleted
| | |
| | | } |
| | | }, |
| | | { |
| | | "name": "要素标绘", |
| | | "uri": "widgets/Plot/Widget", |
| | | "position": { |
| | | "left": 120, |
| | | "top": 44, |
| | | "width": "730px", |
| | | "height": "38px", |
| | | "relativeTo": "map" |
| | | } |
| | | }, |
| | | { |
| | | "name": "测试", |
| | | "uri": "widgets/cs/Widget", |
| | | "position": { |
| | |
| | | "height": "320px", |
| | | "relativeTo": "map" |
| | | } |
| | | }, |
| | | { |
| | | "name": "卷帘对比", |
| | | "uri": "widgets/Rolling/Widget", |
| | | "position": { |
| | | "right": 10, |
| | | "top": 96, |
| | | "width": "400px", |
| | | "height": "50px", |
| | | "relativeTo": "map" |
| | | } |
| | | }, |
| | | { |
| | | "name": "分屏对比", |
| | | "uri": "widgets/Screen/Widget", |
| | | "position": { |
| | | "right": 10, |
| | | "top": 96, |
| | | "width": "400px", |
| | | "height": "50px", |
| | | "relativeTo": "map" |
| | | } |
| | | } |
| | | |
| | | |
| | | ], |
| | | "groups": [], |
| | |
| | | "url": "http://www.sw797.com:801/gzsw3D/v2/data/wp/{z}/{x}/{y}.png" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "name": "谷歌", |
| | | "tooltip": "谷歌", |
| | | "iconUrl": "images/basemaps/tiandituimage.png", |
| | | "layers": [ |
| | | { |
| | | "label": "谷歌", |
| | | "type": "gg" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "name": "百度", |
| | | "tooltip": "百度", |
| | | "iconUrl": "images/basemaps/tiandituimage.png", |
| | | "layers": [ |
| | | { |
| | | "label": "百度", |
| | | "type": "baidu", |
| | | "style": "traffic" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "name": "高德", |
| | | "tooltip": "高德", |
| | | "iconUrl": "images/basemaps/tianditushiliang.png", |
| | | "layers": [ |
| | | { |
| | | "label": "高德", |
| | | "type": "gaod" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "name": "腾讯", |
| | | "tooltip": "腾讯", |
| | | "iconUrl": "images/basemaps/tiandituimage.png", |
| | | "layers": [ |
| | | { |
| | | "label": "腾讯", |
| | | "type": "tenx", |
| | | "layer": "img", |
| | | "style": 2 |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "name": "Gis", |
| | | "tooltip": "Gis", |
| | | "iconUrl": "images/basemaps/tianditushiliang.png", |
| | | "layers": [ |
| | | { |
| | | "type": "gis" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "name": "mapbox", |
| | | "tooltip": "mapbox", |
| | | "iconUrl": "images/basemaps/tiandituimage.png", |
| | | "layers": [ |
| | | { |
| | | "type": "mapbox" |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | "mapOptions": { |
| | |
| | | else if (layerConfig.type == "wmts") { |
| | | layer = new Cesium.WebMapTileServiceImageryProvider(layerConfig); |
| | | } |
| | | else if (layerConfig.type == "gg") { |
| | | layer = DC.ImageryLayerFactory.createGoogleImageryLayer() |
| | | } |
| | | else if (layerConfig.type == "baidu") { |
| | | layer = DC.ImageryLayerFactory.createBaiduImageryLayer() |
| | | |
| | | } |
| | | else if (layerConfig.type == "gaod") { |
| | | layer = DC.ImageryLayerFactory.createAmapImageryLayer() |
| | | } |
| | | else if (layerConfig.type == "tenx") { |
| | | |
| | | layer = DC.ImageryLayerFactory.createTencentImageryLayer() |
| | | |
| | | } |
| | | else if (layerConfig.type == "gis") { |
| | | layer = DC.ImageryLayerFactory.createArcGisImageryLayer({ |
| | | url: |
| | | 'http://cache1.arcgisonline.cn/arcgis/rest/services/SimpleFeature/ChinaBoundaryLine/MapServer' |
| | | }) |
| | | } |
| | | else if (layerConfig.type == "mapbox") { |
| | | layer = new Cesium.MapboxImageryProvider({ |
| | | mapId: 'mapbox.country-boundaries-v1', |
| | | accessToken:'pk.eyJ1Ijoibm5uampqMTIzNDU2IiwiYSI6ImNraDV3YzJlYTFtdnEycmxxaXZpem1tM3cifQ.qaBhT3T_VTxXbeoRAVTkwg' |
| | | }) |
| | | } |
| | | layerArr.push(layer); |
| | | } |
| | | |
| | |
| | | // }); |
| | | // }), 100); |
| | | //无动画的 |
| | | setTimeout(lang.hitch(this,function(){ |
| | | this.map.camera.setView({destination:Cesium.Rectangle.fromDegrees(west, south, east, north)}); |
| | | }),100); |
| | | setTimeout(lang.hitch(this, function () { |
| | | this.map.camera.setView({ destination: Cesium.Rectangle.fromDegrees(west, south, east, north) }); |
| | | }), 100); |
| | | |
| | | //修改全局的homebutton定位 |
| | | Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(west, south, east, north); |
| | |
| | | }) |
| | | $('#measureArea').click(function () { |
| | | window.dcViewer.contextMenu.enable=false; |
| | | contextMenu.enable = false; |
| | | measureSurface.measureArea({ |
| | | unit: _type |
| | | }); |
| New file |
| | |
| | | <div> |
| | | <span class="xx">×</span> |
| | | <div class="plot-box"> |
| | | <ul> |
| | | <li><button drawtype="point">点</button></li> |
| | | <li><button drawtype="billboard">图标点</button></li> |
| | | <li><button drawtype="polyline">线</button></li> |
| | | <li><button drawtype="polygon">面</button></li> |
| | | <li><button drawtype="circle">圆</button></li> |
| | | <li><button drawtype="rectangle">矩形</button></li> |
| | | <li><button drawtype="attack_arrow">进攻箭头</button></li> |
| | | <li><button drawtype="double_arrow">双箭头</button></li> |
| | | <li><button drawtype="fine_arrow">直箭头</button></li> |
| | | <li><button drawtype="tailed_attack_arrow">燕尾箭头</button></li> |
| | | <li><button drawtype="gathering_place">聚集地</button></li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | // Copyright © 2020 zhongsong. All Rights Reserved. |
| | | // 模块描述:河流水面线分析 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | 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-Plot', |
| | | name: 'Plot', |
| | | type: '', |
| | | layer: null, |
| | | plot: null, |
| | | startup: function () { |
| | | |
| | | var that = this; |
| | | $('.jimu-widget-Plot .plot-box ul li button').click(function () { |
| | | window.dcViewer.contextMenu.enable=false; |
| | | var type = $(this).attr('drawtype'); |
| | | that.draw(type); |
| | | }) |
| | | |
| | | $('.xx').click(function () { |
| | | $('.jimu-widget-Plot').hide() |
| | | window.dcViewer.contextMenu.enable=true; |
| | | }) |
| | | |
| | | }, |
| | | |
| | | draw: function (type) { |
| | | var that = this; |
| | | that.plot && that.plot.draw(type, overlay => { |
| | | that.layer.addOverlay(overlay) |
| | | that.plot.edit(overlay) |
| | | }) |
| | | }, |
| | | |
| | | onOpen: function () { |
| | | this.layer = new DC.VectorLayer('layer') |
| | | dcViewer.addLayer(this.layer) |
| | | this.plot = new DC.Plot(dcViewer) |
| | | } |
| | | |
| | | }); |
| | | }); |
| New file |
| | |
| | | /* .tooltipdiv { |
| | | display: block; |
| | | position: absolute; |
| | | visibility: visible; |
| | | max-width: 200px; |
| | | min-width: 100px; |
| | | padding: 1px 1px 1px 25px; |
| | | font-size: 11px; |
| | | z-index: 1000; |
| | | opacity: 0.8; |
| | | -khtml-opacity: 0.8; |
| | | -moz-opacity: 0.8; |
| | | filter: alpha(opacity=80); |
| | | } |
| | | .tooltipdiv.left .tooltipdiv-arrow { |
| | | top: 50%; |
| | | right: 0; |
| | | margin-top: -5px; |
| | | border-top: 5px solid transparent; |
| | | border-bottom: 5px solid transparent; |
| | | border-left: 25px solid #000000; |
| | | } |
| | | .tooltipdiv.right .tooltipdiv-arrow { |
| | | top: 50%; |
| | | left: 0; |
| | | margin-top: -5px; |
| | | border-top: 5px solid transparent; |
| | | border-bottom: 5px solid transparent; |
| | | border-right: 25px solid #000000; |
| | | } |
| | | .tooltipdiv-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; |
| | | } |
| | | .tooltipdiv-arrow { |
| | | position: absolute; |
| | | width: 0; |
| | | height: 0; |
| | | } */ |
| New file |
| | |
| | | .jimu-widget-Plot{ |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #0395f3; |
| | | font-size: 14px; |
| | | border: 1px solid rgb(69, 154, 251); |
| | | color: rgb(238, 235, 235); |
| | | font-size: 16px; |
| | | display: none; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | #table { |
| | | position: relative; |
| | | } |
| | | |
| | | |
| | | |
| | | .jimu-widget-Plot .plot-box { |
| | | position: fixed; |
| | | top: 29px; |
| | | left:120px; |
| | | z-index: 1000; |
| | | height: 50px; |
| | | /* background: rgba(0, 0, 0, 0.6);*/ |
| | | padding: 20px 10px 0 10px; |
| | | } |
| | | |
| | | .jimu-widget-Plot .plot-box ul li { |
| | | display: inline-block; |
| | | } |
| | | |
| | | .jimu-widget-Plot .plot-box ul li button { |
| | | width: 60px; |
| | | height: 30px; |
| | | background-color: rgba(32, 160, 255, .2); |
| | | border: 1px solid #fff; |
| | | color: #fff; |
| | | cursor: pointer; |
| | | |
| | | } |
| | | |
| | | .xx { |
| | | float: right; |
| | | left: 40px; |
| | | font-size: 30px; |
| | | line-height: 20px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | { |
| | | "name": "Plot", |
| | | "2D": true, |
| | | "3D": true, |
| | | "platform": "HTML", |
| | | "version": "2.10", |
| | | "wabVersion": "2.10", |
| | | "author": "jxdnosng", |
| | | "description": "", |
| | | "copyright": "", |
| | | "license": "", |
| | | "properties": { |
| | | "hasConfig": false, |
| | | "inPanel": false, |
| | | "hasVersionManager": false |
| | | } |
| | | } |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "" |
| | | }) |
| | | ); |
| New file |
| | |
| | | define({ |
| | | root: ({ |
| | | _widgetLabel: "PLot" |
| | | }), |
| | | "es": 1, |
| | | "zh-cn": 1 |
| | | }); |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "要素标绘" |
| | | }) |
| | | ); |
| | |
| | | $('.jimu-widget-Rolling').hide(); |
| | | $('#hezi-selectLeft').val(2); |
| | | $('#hezi-selectRight').val(3); |
| | | window.dcViewer.contextMenu.enable=true; |
| | | }); |
| | | |
| | | // 加载左边图层 |
| | |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.earthAtNightLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.earthAtNightLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createWMTSImageryLayer( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.zjLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createWMTSImageryLayer( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | } |
| | |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 UrlTemplateImageryProvider |
| | | that.ganZhouYinLeft = layers.addImageryProvider(new Cesium.UrlTemplateImageryProvider( |
| | | that.ganZhouYinLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createXYZImageryLayer( |
| | | that.imageryProviderArrUrl[0] |
| | | )); |
| | | } |
| | |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.tiandituLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.tiandituLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createXYZImageryLayer( |
| | | that.imageryProviderDian[0] |
| | | )); |
| | | that.tiandituZJLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.tiandituZJLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createXYZImageryLayer( |
| | | that.imageryProviderDian[1] |
| | | )); |
| | | } |
| | |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.earthAtNightRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.earthAtNightRight = layers.addImageryProvider(new DC.ImageryLayerFactory.createWMTSImageryLayer( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjRight = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.zjRight = layers.addImageryProvider(new DC.ImageryLayerFactory.createWMTSImageryLayer( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | } |
| | |
| | | function loadMapGzRight() { |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = viewer.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 UrlTemplateImageryProvider |
| | | that.ganZhouYinRight = layers.addImageryProvider(new Cesium.UrlTemplateImageryProvider( |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 createXYZImageryLayer |
| | | that.ganZhouYinRight = layers.addImageryProvider(new DC.ImageryLayerFactory.createXYZImageryLayer( |
| | | that.imageryProviderArrUrl[0] |
| | | )); |
| | | } |
| | |
| | | //imageryLayers获取将在地球上渲染的图像图层的集合 |
| | | var layers = that.map.imageryLayers; |
| | | //addImageryProvider使用给定的ImageryProvider创建一个新层,并将其添加到集合中 |
| | | that.earthAtNightLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.earthAtNightLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createWMTSImageryLayer( |
| | | that.imageryProviderAdd[0] |
| | | )); |
| | | that.zjLeft = layers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider( |
| | | that.zjLeft = layers.addImageryProvider(new DC.ImageryLayerFactory.createWMTSImageryLayer( |
| | | that.imageryProviderAdd[1] |
| | | )); |
| | | } |
| New file |
| | |
| | | <div> |
| | | <div class="rollinng-table-hezis"> |
| | | <div class="hezi-left-selects"> |
| | | <span class="hezi-leftspans" id="gaibians">左侧图层 :</span> |
| | | <select class="hezi-selects" id="hezi-selectLefts"> |
| | | <option class="optionVal2" value="2">天地图矢量</option> |
| | | <option class="optionVal1" value="1">天地图影像</option> |
| | | </select> |
| | | </div> |
| | | <div class="hezi-right-selects"> |
| | | <span class="hezi-rightspans">右侧图层 :</span> |
| | | <select class="hezi-selects" id="hezi-selectRights"> |
| | | <option class="optionVal3" value="1">天地图矢量</option> |
| | | <option class="optionVal4" value="2">天地图影像</option> |
| | | </select> |
| | | </div> |
| | | <span class="rollinng-table-hezi-xxs">x</span> |
| | | </div> |
| | | <div class="hiddenHeZis"> |
| | | <div id="sliders1"></div> |
| | | <div id="sliders2"></div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | 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-Screen', |
| | | name: 'Screen', |
| | | flag: false, |
| | | viewers: '', |
| | | viewerss: '', |
| | | startup: function () { |
| | | var that = this; |
| | | // 点击卷帘关闭面板 |
| | | $('.rollinng-table-hezi-xxs').click(function () { |
| | | $('.jimu-widget-Screen').hide(); |
| | | }); |
| | | that.viewers = new Cesium.Viewer('sliders2', { |
| | | baseLayerPicker: false, |
| | | animation: false,//是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false,//是否显示图层选择器 |
| | | fullscreenButton: false,//是否显示全屏按钮 |
| | | geocoder: false,//是否显示geocoder小器件,右上角查询按钮 |
| | | homeButton: false,//是否显示Home按钮 |
| | | infoBox: false,//是否显示信息框 |
| | | sceneModePicker: false,//是否显示3D/2D选择器 |
| | | selectionIndicator: false,//是否显示选取指示器组件 |
| | | timeline: false,//是否显示时间轴 |
| | | navigationHelpButton: false,//是否显示右上角的帮助按钮 |
| | | imageryProvider: new Cesium.ArcGisMapServerImageryProvider({ |
| | | url: 'http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetWarm/MapServer' |
| | | }) |
| | | }); |
| | | that.viewers._cesiumWidget._creditContainer.style.display = "none"; |
| | | |
| | | that.viewerss = new Cesium.Viewer('sliders1', { |
| | | baseLayerPicker: false, |
| | | animation: false,//是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false,//是否显示图层选择器 |
| | | fullscreenButton: false,//是否显示全屏按钮 |
| | | geocoder: false,//是否显示geocoder小器件,右上角查询按钮 |
| | | homeButton: false,//是否显示Home按钮 |
| | | infoBox: false,//是否显示信息框 |
| | | sceneModePicker: false,//是否显示3D/2D选择器 |
| | | selectionIndicator: false,//是否显示选取指示器组件 |
| | | timeline: false,//是否显示时间轴 |
| | | navigationHelpButton: false,//是否显示右上角的帮助按钮 |
| | | imageryProvider: 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 |
| | | }) |
| | | }); |
| | | that.viewerss._cesiumWidget._creditContainer.style.display = "none"; |
| | | initHandler() |
| | | // 加载左边图层 |
| | | $('#hezi-selectLefts').on('change', function () { |
| | | $('#sliders2').html(""); |
| | | that.viewers = ''; |
| | | if ($(this).val() == 2) { |
| | | that.viewers = new Cesium.Viewer('sliders2', { |
| | | baseLayerPicker: false, |
| | | animation: false,//是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false,//是否显示图层选择器 |
| | | fullscreenButton: false,//是否显示全屏按钮 |
| | | geocoder: false,//是否显示geocoder小器件,右上角查询按钮 |
| | | homeButton: false,//是否显示Home按钮 |
| | | infoBox: false,//是否显示信息框 |
| | | sceneModePicker: false,//是否显示3D/2D选择器 |
| | | selectionIndicator: false,//是否显示选取指示器组件 |
| | | timeline: false,//是否显示时间轴 |
| | | navigationHelpButton: false,//是否显示右上角的帮助按钮 |
| | | imageryProvider: new Cesium.WebMapTileServiceImageryProvider({ |
| | | "label": "天地图矢量", |
| | | "type": "wmts", |
| | | "url": "http://t0.tianditu.gov.cn/vec_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0", |
| | | "layer": "vec", |
| | | "style": "default", |
| | | "format": "tiles", |
| | | "tileMatrixSetID": "w", |
| | | "maximumLevel": 17 |
| | | }) |
| | | }); |
| | | that.viewers._cesiumWidget._creditContainer.style.display = "none"; |
| | | initHandler() |
| | | } |
| | | else if ($(this).val() == 1) { |
| | | that.viewers = new Cesium.Viewer('sliders2', { |
| | | baseLayerPicker: false, |
| | | animation: false,//是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false,//是否显示图层选择器 |
| | | fullscreenButton: false,//是否显示全屏按钮 |
| | | geocoder: false,//是否显示geocoder小器件,右上角查询按钮 |
| | | homeButton: false,//是否显示Home按钮 |
| | | infoBox: false,//是否显示信息框 |
| | | sceneModePicker: false,//是否显示3D/2D选择器 |
| | | selectionIndicator: false,//是否显示选取指示器组件 |
| | | timeline: false,//是否显示时间轴 |
| | | navigationHelpButton: false,//是否显示右上角的帮助按钮 |
| | | imageryProvider: 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 |
| | | }) |
| | | }); |
| | | that.viewers._cesiumWidget._creditContainer.style.display = "none"; |
| | | initHandler() |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 加载右边图层 |
| | | $('#hezi-selectRights').on('change', function () { |
| | | $('#sliders1').html(""); |
| | | that.viewerss = ''; |
| | | if ($(this).val() == 2) { |
| | | that.viewerss = new Cesium.Viewer('sliders1', { |
| | | baseLayerPicker: false, |
| | | animation: false,//是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false,//是否显示图层选择器 |
| | | fullscreenButton: false,//是否显示全屏按钮 |
| | | geocoder: false,//是否显示geocoder小器件,右上角查询按钮 |
| | | homeButton: false,//是否显示Home按钮 |
| | | infoBox: false,//是否显示信息框 |
| | | sceneModePicker: false,//是否显示3D/2D选择器 |
| | | selectionIndicator: false,//是否显示选取指示器组件 |
| | | timeline: false,//是否显示时间轴 |
| | | navigationHelpButton: false,//是否显示右上角的帮助按钮 |
| | | imageryProvider: new Cesium.WebMapTileServiceImageryProvider({ |
| | | "label": "天地图矢量", |
| | | "type": "wmts", |
| | | "url": "http://t0.tianditu.gov.cn/vec_w/wmts?tk=e9533f5acb2ac470b07f406a4d24b4f0", |
| | | "layer": "vec", |
| | | "style": "default", |
| | | "format": "tiles", |
| | | "tileMatrixSetID": "w", |
| | | "maximumLevel": 17 |
| | | }) |
| | | }); |
| | | that.viewerss._cesiumWidget._creditContainer.style.display = "none"; |
| | | initHandler() |
| | | } |
| | | else if ($(this).val() == 1) { |
| | | that.viewerss = new Cesium.Viewer('sliders1', { |
| | | baseLayerPicker: false, |
| | | animation: false,//是否创建动画小器件,左下角仪表 |
| | | baseLayerPicker: false,//是否显示图层选择器 |
| | | fullscreenButton: false,//是否显示全屏按钮 |
| | | geocoder: false,//是否显示geocoder小器件,右上角查询按钮 |
| | | homeButton: false,//是否显示Home按钮 |
| | | infoBox: false,//是否显示信息框 |
| | | sceneModePicker: false,//是否显示3D/2D选择器 |
| | | selectionIndicator: false,//是否显示选取指示器组件 |
| | | timeline: false,//是否显示时间轴 |
| | | navigationHelpButton: false,//是否显示右上角的帮助按钮 |
| | | imageryProvider: 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 |
| | | }) |
| | | }); |
| | | that.viewerss._cesiumWidget._creditContainer.style.display = "none"; |
| | | initHandler() |
| | | } |
| | | }); |
| | | |
| | | |
| | | //鼠标监听事件 |
| | | function initHandler() { |
| | | var _self = this; |
| | | if (_self.handler && _self.handler.getInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE)) { |
| | | return; |
| | | } |
| | | _self.handler = new Cesium.ScreenSpaceEventHandler(that.viewers.scene.canvas); |
| | | _self.handler1 = new Cesium.ScreenSpaceEventHandler(that.viewerss.scene.canvas); |
| | | _self.handler.setInputAction(function (movement) { |
| | | var _camerca = that.viewers.camera; |
| | | that.viewerss.camera.setView({ |
| | | destination: _camerca.position, |
| | | orientation: { |
| | | direction: _camerca._direction, |
| | | up: _camerca.up, |
| | | heading: _camerca.heading, |
| | | pitch: _camerca.pitch, |
| | | roll: _camerca.roll |
| | | } |
| | | }); |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); |
| | | |
| | | _self.handler.setInputAction(function (movement) { |
| | | var _camerca = that.viewers.camera; |
| | | that.viewerss.camera.setView({ |
| | | destination: _camerca.position, |
| | | orientation: { |
| | | direction: _camerca._direction, |
| | | up: _camerca.up, |
| | | heading: _camerca.heading, |
| | | pitch: _camerca.pitch, |
| | | roll: _camerca.roll |
| | | } |
| | | }); |
| | | }, Cesium.ScreenSpaceEventType.WHEEL); |
| | | |
| | | |
| | | _self.handler1.setInputAction(function (movement) { |
| | | var _camerca = that.viewerss.camera; |
| | | that.viewers.camera.setView({ |
| | | destination: _camerca.position, |
| | | orientation: { |
| | | direction: _camerca._direction, |
| | | up: _camerca.up, |
| | | heading: _camerca.heading, |
| | | pitch: _camerca.pitch, |
| | | roll: _camerca.roll |
| | | } |
| | | }); |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); |
| | | |
| | | _self.handler1.setInputAction(function (movement) { |
| | | var _camerca = that.viewerss.camera; |
| | | that.viewers.camera.setView({ |
| | | destination: _camerca.position, |
| | | orientation: { |
| | | direction: _camerca._direction, |
| | | up: _camerca.up, |
| | | heading: _camerca.heading, |
| | | pitch: _camerca.pitch, |
| | | roll: _camerca.roll |
| | | } |
| | | }); |
| | | }, Cesium.ScreenSpaceEventType.WHEEL); |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | 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); |
| | | } |
| | | |
| | | }); |
| | | }); |
| New file |
| | |
| | | .jimu-widget-Screen{ |
| | | width: 100%; |
| | | height: 320px; |
| | | /* background-color: #323a36; */ |
| | | background-color: #3c464b; |
| | | font-size: 14px; |
| | | /* border: 1px solid rgb(69, 154, 251); */ |
| | | color: rgb(238, 235, 235); |
| | | font-size: 16px; |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 10px; |
| | | display: none; |
| | | } |
| | | |
| | | .rollinng-table-hezis { |
| | | position: fixed; |
| | | z-index: 100; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 15px; |
| | | } |
| | | |
| | | .hezi-left-selects { |
| | | line-height: 50px; |
| | | } |
| | | |
| | | .hezi-right-selects { |
| | | height: 32px; |
| | | } |
| | | |
| | | .hezi-leftspans, .hezi-rightspans { |
| | | font-size: 14px; |
| | | color: #fff; |
| | | margin-right: 7px; |
| | | } |
| | | |
| | | .hezi-selects { |
| | | background-color: #404853; |
| | | color: #fff; |
| | | padding: 5px; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | |
| | | |
| | | .hezi-selects:hover { |
| | | background-color: #ccc; |
| | | color: #3c464b; |
| | | } |
| | | |
| | | .rollinng-table-hezi-xxs { |
| | | font-size: 20px; |
| | | margin-bottom: 5px; |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .rollinng-table-hezi-xxs:hover { |
| | | cursor: pointer; |
| | | color: red; |
| | | } |
| | | |
| | | #sliders1 { |
| | | position: absolute; |
| | | left: 150%; |
| | | top: 0; |
| | | background-color: #D3D3D3; |
| | | width: 50%; |
| | | height: 100%; |
| | | z-index: 1; |
| | | } |
| | | |
| | | #sliders2 { |
| | | position: absolute; |
| | | left: 100%; |
| | | top: 0; |
| | | background-color: #D3D3D3; |
| | | width: 50%; |
| | | height: 100%; |
| | | z-index: 1; |
| | | } |
| | | |
| | | #sliders:hover { |
| | | cursor: ew-resize; |
| | | } |
| | | |
| | | .hiddenHeZis { |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 100%; |
| | | left: -100%; |
| | | top: 0%; |
| | | z-index: 22; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | { |
| | | "name": "Rolling", |
| | | "2D": true, |
| | | "3D": true, |
| | | "platform": "HTML", |
| | | "version": "2.10", |
| | | "wabVersion": "2.10", |
| | | "author": "jxdnosng", |
| | | "description": "", |
| | | "copyright": "", |
| | | "license": "", |
| | | "properties": { |
| | | "hasConfig": false, |
| | | "inPanel": false, |
| | | "hasVersionManager": false |
| | | } |
| | | } |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "goScreen" |
| | | }) |
| | | ); |
| New file |
| | |
| | | define({ |
| | | root: ({ |
| | | _widgetLabel: "Screen" |
| | | }), |
| | | "es": 1, |
| | | "zh-cn": 1 |
| | | }); |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "分屏对比" |
| | | }) |
| | | ); |
| | |
| | | $('.jimu-widget-DynamicRiver').hide(); |
| | | $('.tool-y-box').toggle() |
| | | } |
| | | else if (calssName == 'rolling-tool') { |
| | | else if (calssName == 'Rolling-tool') { |
| | | window.dcViewer.contextMenu.enable=false; |
| | | // 卷帘对比 |
| | | topic.publish('openRolling', 'Rolling'); |
| | | $('.jimu-widget-Location').hide(); |
| | |
| | | $('.jimu-widget-scene').show(); |
| | | $('.tool-y-box').toggle() |
| | | } |
| | | else if (calssName == 'Plot-tool') { |
| | | // 要素标绘 |
| | | $('.jimu-widget-RouteNavigate').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-Measurement').hide(); |
| | | $('.jimu-widget-Sign').hide(); |
| | | $('.jimu-widget-FlyRoute').hide(); |
| | | $('.jimu-widget-DynamicRiver').hide(); |
| | | $('.jimu-widget-scene').hide(); |
| | | $('.jimu-widget-Plot').show(); |
| | | $('.tool-y-box').toggle() |
| | | } |
| | | else if (calssName == 'Screen-tool') { |
| | | // 分屏对比 |
| | | $('.jimu-widget-Location').hide(); |
| | | $('.jimu-widget-Rolling').hide(); |
| | | $('#widgets_Rolling_Widget_17').hide(); |
| | | $('.jimu-widget-Measurement').hide(); |
| | | $('.jimu-widget-FlyRoute').hide(); |
| | | $('.jimu-widget-DynamicRiver').hide(); |
| | | $('.tool-y-box').toggle(); |
| | | $('.jimu-widget-Screen').show(); |
| | | } |
| | | |
| | | |
| | | |