How does one get a specific ol.control or ol.interaction from ol.Map? I have several dynamically added maps on a single page and I want to be able to access the ol.interaction.Select.
map.getInteractions().forEach(function (interaction) {
if(interaction instanceof ol.interaction.Select) { ... }
});
Same thing for controls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With