self.plotEditControl = new self.cesium.PlotEditControl(
self.scene,
self.plottingLayer,
); //编辑控件
self.plotDrawControl = new self.cesium.PlotDrawControl(
self.scene,
self.plottingLayer,
); //绘制控件
self.plotDrawControl.drawControlEndEvent.addEventListener(()=>{
//标绘结束,激活编辑控件
self.plotEditControl.activate();
});
self.plotting = self.cesium.Plotting.getInstance(
self.serverUrl,
self.scene,
);
//标绘面板
// initPlotPanel("plotPanel", serverUrl, plotDrawControl, plotEditControl, plotting);
// 属性面板
// self.stylePanel = new StylePanel(
// 'stylePanel',
// self.plotEditControl,
// self.plotting,
// );
//设置标号默认的模型路径
self.plotDrawControl.drawFinishEvent.addEventListener(function (geo) {
if (geo.symbolType === SuperMap.Plot.SymbolType.DOTSYMBOL) {
geo.modelPath = './SampleData/plot/Cesium_Air.gltf';
geo.picturePath = './SampleData/plot/blupin.png';
}
});
self.plotDrawControl.serverUrl = self.serverUrl;
self.plotDrawControl.activate();
if (undefined !== self.plotEditControl) {
self.plotEditControl.deactivate();
}
}