js引入:<script type="text/javascript" src="./build/Cesium/ThirdParty/Workers/PlotAlgo/PlotAlgoInclude.js"></script>
代码处使用如下
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);
},
vue项目中有三处使用了标绘方法,进入一个标绘页面,再进去其他标绘页面,标绘对象被绑死在第一次进入的页面,第二个页面标绘的图层,显示在第一个页面,销毁了Plotting也不行,请问是什么原因