79742292

Date: 2025-08-21 12:32:27
Score: 1
Natty:
Report link

when creating interaction:

const drawInteraction = new ol.interaction.Draw({
    source: source,
    type: 'Point'
});
drawInteraction.setProperties({ somePropertyName: true });
map.addInteraction(drawInteraction);

when you need to delete this interaction:

const interactions = map.getInteractions().getArray().slice();
interactions.forEach(int => {
    if (int.getProperties().somePropertyName) map.removeInteraction(int);
});
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): when
  • Low reputation (1):
Posted by: Максим Попов