title: Bounding box in mapbox.js
body: <p>I have a spatial database with thousands of polygons distributed across a country. I want to display those polygons in a mapbox or a leaflet map. However, a simple query that retrieves all of the objects in the database is a massive load for the network and takes a long time, and when it finally loads it takes much of the RAM just holding the geojson object. </p>
  
  <p>I want to solve this more intelligently by querying only the objects that fall within the current map viewport. To this end, I modified my REST service to receive a polygon and using it to filter the queryset (I am using Django REST). This is already working, what I can't figure out is how to obtain the extent of the current viewport.</p>
  
  <p>Does mapbox.js expose this functionality? How can I solve this?</p>
  
  <p>By the way, I am using mapbox.js instead of mapboxgl only because of omnivore support as I am using the well known text format. I am in an early development stage so if this is easier to solve with another library I am open to considering it.</p>