无法从叠加层中删除图层

时间:2020-08-13 06:55:05

标签: leaflet

您好,我正在Angular2中使用传单1.3.1。我正在使用叠加层,并尝试将元素添加到叠加层中。我还添加了一个特殊的叠加层,当按下该叠加层时,将显示所有图层。我有以下问题: 当我在传单菜单中按“查看所有图层”时,可以看到所有图层,但是在显示的右侧菜单中,叠加层的所有其他复选框均显示为选中状态(应该显示为未选中状态)。 我试图通过以这种方式用传单地图解析事件来解决此问题:

this.map.on('overlayremove',function(e){    
    //code for removing the other layers in the map
    map.removeLayer(layer);
    
    })
    
    When I uncheck the checkbox "menu all layers" all markers are removed and when map.removeLayer(layer) is executed in the this.map.on event the specific layer is not unchecked from the map menu any idea. </blink>

0 个答案:

没有答案
相关问题