Make select interaction create its FeatureOverlay
You can now configure it with a `style` option.
This commit is contained in:
@@ -227,12 +227,15 @@ var overlayStyle = (function() {
|
||||
};
|
||||
})();
|
||||
|
||||
var select = new ol.interaction.Select({
|
||||
style: overlayStyle
|
||||
});
|
||||
var overlay = new ol.FeatureOverlay({
|
||||
features: select.getFeatures(),
|
||||
style: overlayStyle
|
||||
});
|
||||
|
||||
var modify = new ol.interaction.Modify({ featureOverlay: overlay });
|
||||
var select = new ol.interaction.Select({ featureOverlay: overlay });
|
||||
|
||||
var map = new ol.Map({
|
||||
interactions: ol.interaction.defaults().extend([select, modify]),
|
||||
|
||||
Reference in New Issue
Block a user