Skip to content

Commit

Permalink
fix(search-results): remove previous selection with new selection (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeLafreniere18 authored Jun 29, 2020
1 parent e17e150 commit 95c0583
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,7 @@ export class SearchResultsToolComponent implements OnInit, OnDestroy {
* @param result A search result that could be a feature or some layer options
*/
onResultSelect(result: SearchResult) {
for (const feature of this.store.all()) {
if (this.map.overlay.dataSource.ol.getFeatureById(feature.meta.id)) {
this.map.overlay.removeFeature(feature.data as Feature);
}
}
this.map.overlay.dataSource.ol.clear();
this.tryAddFeatureToMap(result);

if (this.topPanelState === 'expanded') {
Expand Down

0 comments on commit 95c0583

Please sign in to comment.