三维动态标绘在vue中报错

0 投票

请问是缺少什么引用吗?

6月 23, 2021 分类:  102次浏览 | 用户: Journey (6 分)

1个回答

1 投票
 
已采纳
您好,还需要引入PlotAlgoInclude.js,在Build/Cesium/ThirdParty/Workers/PlotAlgo文件夹下面
6月 24, 2021 用户: 卷饼先生 登峰造极 (5,921 分)
采纳于 6月 24, 2021 用户:Journey
解决了 谢谢!
您好,你这个是怎么出来的,我报这个错ReferenceError: SuperMap is not defined

代码:

 // 绘制面板

    imageClick(val) {

      var viewer=window.viewer;

      var host = 'http://support.supermap.com.cn:8090';

      var serverUrl = host + '/iserver/services/plot-jingyong/rest/plot';

       this.InitPlot(viewer, serverUrl);

    },

    InitPlot(viewer, serverUrl) {

      console.log(11);

      var scene=viewer.scene;

      var cesium = Cesium;

      var plottingLayer;

      var plotEditControl;

      var plotDrawControl;

      var plotPanel;

      var plotting;

      

        plottingLayer = new cesium.PlottingLayer(scene, "plottingLayer");

        scene.plotLayers.add(plottingLayer);

        plotEditControl = new cesium.PlotEditControl(scene, plottingLayer);//编辑控件

        plotDrawControl = new cesium.PlotDrawControl(scene, plottingLayer);//绘制控件

        plotDrawControl.drawControlEndEvent.addEventListener(function () {//标绘结束,激活编辑控件

            plotEditControl.activate();

        });

        plotting = cesium.Plotting.getInstance(serverUrl,scene);

        //标绘面板

        initPlotPanel("plotPanel", serverUrl, plotDrawControl, plotEditControl, plotting);

        stylePanel = new StylePanel('stylePanel', plotEditControl, plotting);

    },
...