You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
一、当第二次点击其他图形绘制时,就会报以下错: VM32937:1 Uncaught ReferenceError: RuntimeError is not defined at Tl.add (eval at <anonymous> (Cesium.js:1), <anonymous>:1:3881794) at Plotting.InitPlot (plotting.js?159d:26) at new Plotting (plotting.js?159d:15) at o.imageClick (index.vue?0dbc:234) at click (index.vue?f684:31) at i (vue.min.js:6) at HTMLImageElement.Rr.t._withTask.o._withTask (vue.min.js:6) 二、这是vue页面调用plotting.js文件实现的: method:{ // 绘制面板 imageClick(val) { var plotting = new Plotting(window.viewer); if (plotting) { plotting.DrawCellClick(val); } }, }
第一次点击一个图形可以进行绘制,但是当你第二次点击其他图形绘制时就会报错???
一、当第二次点击其他图形绘制时,就会报以下错:
VM32937:1 Uncaught ReferenceError: RuntimeError is not defined at Tl.add (eval at <anonymous> (Cesium.js:1), <anonymous>:1:3881794) at Plotting.InitPlot (plotting.js?159d:26) at new Plotting (plotting.js?159d:15) at o.imageClick (index.vue?0dbc:234) at click (index.vue?f684:31) at i (vue.min.js:6) at HTMLImageElement.Rr.t._withTask.o._withTask (vue.min.js:6)
二、这是vue页面调用plotting.js文件实现的:
method:{ // 绘制面板 imageClick(val) { var plotting = new Plotting(window.viewer); if (plotting) { plotting.DrawCellClick(val); } }, }
三、这是我提取出来的文件和开源集成的:
`class Plotting {
constructor(viewer) {
this.viewer = viewer;
this.host = 'http://support.supermap.com.cn:8090';
this.cesium = Cesium;
this.scene = viewer.scene;
this.scene.globe.depthTestAgainstTerrain = false;
this.serverUrl = this.host + '/iserver/services/plot-jingyong/rest/plot';
this.plotting;
this.plottingLayer;
this.plotEditControl;
this.plotDrawControl;
this.plotPanel;
this.stylePanel;
this.InitPlot();
}
InitPlot() {
var self = this;
if (!this.viewer) {
return;
}
self.plottingLayer = new self.cesium.PlottingLayer(
self.scene,
'plottingLayer',
);
self.scene.plotLayers.add(self.plottingLayer);
}
DrawCellClick(drawCellparam) {
console.log(drawCellparam,'drawcell');
console.log(this.plotDrawControl,'plotDraw');
var self = this;
if (self.plotDrawControl !== null) {
self.plotDrawControl.deactivate();
self.plotDrawControl.libID = drawCellparam.libID;
self.plotDrawControl.code = drawCellparam.symbolCode;
}
//删除指定标号
deleteSeleGeo() {
var self = this;
self.plottingLayer.removeGeoGraphicObject(
self.plottingLayer.selectedFeature,
);
}
//获取属性面板GridDom
getGridDomObdect() {
var self = this;
return self.stylePanel.getDomObject();
}
// // 想要通过该方法来暴露x
// showX () {
// return this.x
// }
}
export default Plotting;
`
The text was updated successfully, but these errors were encountered: