I want to show a physical bounding box on my map. Suppose I have four examples points as follows:
var southWest = new mapboxgl.LngLat(-73.9876, 40.7661);
var northWest = new mapboxgl.LngLat(-73.9397, 41.8002);
var northEast = new mapboxgl.LngLat(-73.9397, 40.8002);
var southEast = new mapboxgl.LngLat(-73.9876, 39.8002);
I know there is a method similar to the following:
var boundingBox = new mapboxgl.LngLatBounds(southWest, northEast);
However, I want a box to account for all 4 coordinates. Are there good methods for this? I want the box to show up over my existing map that is apart of a React/JS application.