esMap2D//地图对象
esMap2D.movingTarget = L.supermap.plotting.movingTargetLayer("plot", EsMapURL.SuperMapService.plotUrl);
esMap2D.movingTarget.addTo(esMap2D);
//军标右击
esMap.movingTarget.on("featurecontextmenu", (event) => {
console.log("右击2")
});
let plotLayer = this.map2D.Layer2DManager.addLayer(
cmapp.ShareMap.EsMapConstants.LAYER_TYPE_2D.PLOTTING,
{ layerName: "标绘图层" },
{
options: {
type: "layer",
isChoosed:true
},
parentNodeName:'标绘',
}
);
//绑定图层,控制显示隐藏 this.map2D.Layer2DManager.setDrawingLayer(plotLayer);
右击事件和绑定图层的显隐我想要同时使用,目前只能使用其中的任何一种,请教下是我哪里写的有问题吗?谢谢