In this plunker, I used .Draw interaction to create a polygon. Once the polygon is finished, it finds all the points of the function in the polygon and selects them.
Here is the link to the plunker
Here is a snippet of the draw.on('drawend',... listener draw.on('drawend',... :
draw.on('drawend', function(e) { e.preventDefault();
source share