我们在执行一个任务的时候,有时候需要清除leaflet的所有图层,怎么解决呢? 核心代码 clearAll(){ this.map.eachLayer(function(layer){ this.map.removeLayer(layer); }); } 另外的场景:保留地图 clearAll(