首页 / 浏览问题 / 三维GIS / 问题详情
三维动态标绘在vue中报错
6EXP 2021年06月23日

请问是缺少什么引用吗?

1个回答

您好,还需要引入PlotAlgoInclude.js,在Build/Cesium/ThirdParty/Workers/PlotAlgo文件夹下面
康鑫
1
6,087EXP 2021年06月24日
解决了 谢谢!
您好,你这个是怎么出来的,我报这个错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);

    },
...