使用产品:icilent 11i for leaflet
问题详细描述:调用leaflet-side-by-side时候,帘拖动按钮不在地图中心
以下是代码:
//卷帘切换事件
//激活图层存在layerActive对象中进行调用
//当检测到leftSeleted变化时激活此事件
onSelectedChange() {
var left = this.layerActive.find((item) => item.name === this.$refs.leftSeleted.value);
var right = this.layerActive.find((item) => item.name === this.$refs.rightSeleted.value);
console.log('左', left)
console.log('右', right)
if (this.siderLayer !== null) { this.map.removeControl(this.siderLayer) }
this.siderLayer = new L.control.sideBySide([], [])
this.siderLayer.setLeftLayers(left.layer)
this.siderLayer.setRightLayers(right.layer)
this.siderLayer.addTo(this.map)
},