ol3 and jsts – feature overlap in layer

The following function will help you check if there is an overlap between a certain feature and a layer. In order to work, the example needs ol3 and the JSTS library loaded.

The code above can be improved.