From b435f2b1fc2bc8ad392dfa78aed1a5bc70c8b1e4 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 08 Jun 2021 08:48:33 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap

---
 widgets/plottingP/Widget.js |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/widgets/plotting/Widget.js b/widgets/plottingP/Widget.js
similarity index 71%
rename from widgets/plotting/Widget.js
rename to widgets/plottingP/Widget.js
index e1a3214..58d91b9 100644
--- a/widgets/plotting/Widget.js
+++ b/widgets/plottingP/Widget.js
@@ -19,33 +19,41 @@
         BaseWidget
     ) {
         return declare([BaseWidget], {
-            baseClass: 'jimu-widget-plotting',
-            name: 'plotting',
+            baseClass: 'jimu-widget-plottingP',
+            name: 'plottingP',
             type: '',
             startup: function () {
+                // js: ../../Build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js 重要    
+                // css: ../../Build/Cesium/Widgets/widgets.css 地图样式 不影响
+                // css:./css/sideBar.css  不影响
+                // js: js/plotPanelControl/PlottingUI.Include.js 重要      
+                // js: js/bootstrap.min.js 不影响
+                // css: css/bootstrap-new.min.css 不影响
+                // js: http://www.supermapol.com/earth/Build/Cesium/Cesium.js 地图js 不影响
                 var cesium, scene, viewer, serverUrl, plotting;
                 var plottingLayer;
                 var plotEditControl;
                 var plotDrawControl;
                 var plotPanel;
-
-                var begin = (Cesium) => {
-                    cesium = Cesium;
+                // var map = window.viewer;//加载地图数据
+                viewer = window.viewer;
+                cesium = Cesium;
+                scene = viewer.scene;
+                var begin = () => {
                     var host = 'http://support.supermap.com.cn:8090';
-                    viewer = new Cesium.Viewer('cesiumContainer');
-                    scene = viewer.scene;
+                    // var host = 'http://localhost:8090';
                     scene.globe.depthTestAgainstTerrain = false;
                     serverUrl = host + '/iserver/services/plot-jingyong/rest/plot';
                     InitPlot(viewer, serverUrl);
                 };
                 var InitPlot = (viewer, serverUrl) => {
-                    // console.log(viewer, serverUrl)
                     if (!viewer) {
                         return;
                     }
                     plottingLayer = new cesium.PlottingLayer(scene, "plottingLayer");
-                    scene.plotLayers.add(plottingLayer);
-
+                    // console.log(scene)
+                    // scene.plotLayers.add(plottingLayer);
+                    scene.layers.add(plottingLayer);
                     plotEditControl = new cesium.PlotEditControl(scene, plottingLayer);//编辑控件
                     plotDrawControl = new cesium.PlotDrawControl(scene, plottingLayer);//绘制控件
                     plotDrawControl.drawControlEndEvent.addEventListener(function () {//标绘结束,激活编辑控件
@@ -71,7 +79,7 @@
 
                 if (typeof Cesium !== 'undefined') {
                     window.startupCalled = true;
-                    begin(Cesium);
+                    // begin(Cesium);
                 }
             }
 

--
Gitblit v1.9.3