在初始化地图时保存source: var source = new ol.source.Vector({wrapX: false}); 然后在需要清除时运行如下代码: source.clear(); 成功清除矢量图层.....