Skip to content

Commit 55206a0

Browse files
committed
fix 图层要素查询A后再查询B,点击A报错
1 parent 72f9df9 commit 55206a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/leaflet/components/search/SearchView.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,9 @@ export var SearchView = ComponentsViewBase.extend({
664664
this.map.closePopup();
665665
//若当前是查询图层的结果,则不删除图层,只修改样式
666666
!this.isSearchLayer && this.map.removeLayer(this.searchResultLayer);
667+
this.searchResultLayer.eachLayer((layer) => {
668+
layer.off('click');
669+
});
667670
if (this._selectMarkerFeature) {
668671
this.map.removeLayer(this._selectMarkerFeature);
669672
this.isSearchLayer && this._selectFeature.addTo(this.map);

0 commit comments

Comments
 (0)