Reputation: 1
in ol3, after executing
layer.setVisible(false);
selected Features are still visible. I wanne all features of a layer to be completely hidden after I set the layer to be invisible. How to solve the problem ?
Thanks,
Upvotes: 0
Views: 445
Reputation: 14150
First, clear the selection:
var select = new ol.interaction.Select();
var collection = select.getFeatures();
collection.clear();
or
select.getFeatures().clear();
Upvotes: 1