I use openlayers. I am creating a form that the user can insert a bounding box to the database.
In my page I have the form and a map, so the user can preview what he entered.
So I thought it would be nice if there was also the other way around :
User hits a button like "Get current bounding box", and that gets the bounding box from the map at any given time and transport it to the form. The numbers of the bounding box that is. I'm talking about the bounding box that the users see, not the whole map's box.
After that, user can hit "Save" and submit the form, or can clear the form, or edit it, or zoom/pan the map and hit "Get current bounding box" again.
I think you got the idea...
Is that possible?
How can I get map's bounding box at any given time?
Thanks in advance