I'm using OpenLayers-3.8.2 for developing a GIS application. Users draw some features and can modify all existing features on the map. They can delete features. I can delete feature as follow:
- user click some features
- User click on a button and then:
layer.getSource().removeFeature(feature)
Now I want the user to be able to remove features with del
key.
What do I implement it?