Open layer select zone

Hey,

Starting using Open Layer v2 recently, it was awesome as it’s more flexible than other vendors.
In fact i decide to write this post to give me the exact and simple solution for enabling select zone drag box for zones selecting features. What i have found until now is this link in the official weebsite :

      [<img src="https://preview.ibb.co/ksOKmy/Sans_titre.jpg"/>](https://ibb.co/mQzs6y)

 so how can i, display the select box area using OLv2 Javascript API.

Best.

Why are you using the outdated OL v2 instead of the modernized current version?

openstreetmap.org uses Leaflet, which is supposed to be more lightweight and simple:
https://leafletjs.com/