I am doing a maplayer switch function but when I switch the layer, the 
selected feature is not unselected. May I know how to unselect a feature in 
openlayer 3.


$("#show-field-map").click(function(event) {
    map.removeLayer(subbasinJsonp);
    map.addLayer(fieldJsonp);
    $('#show-subbasin-map').attr("disabled", false);
    $('#show-field-map').attr("disabled", true);
});

$("#show-subbasin-map").click(function(event) {
    map.removeLayer(fieldJsonp);
    map.addLayer(subbasinJsonp);
    $('#show-field-map').attr("disabled", false);
    $('#show-subbasin-map').attr("disabled", true);
});

-- 
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/e8b5ec52-ee62-4e84-867c-62a980c6f367%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to