src/lib/map_event_to_bounding_box.js
function mapEventToBoundingBox(mapEvent, buffer = 0) {
  return [
    [mapEvent.point.x - buffer, mapEvent.point.y - buffer],
    [mapEvent.point.x + buffer, mapEvent.point.y + buffer]
  ];
}
function mapEventToBoundingBox(mapEvent, buffer = 0) {
  return [
    [mapEvent.point.x - buffer, mapEvent.point.y - buffer],
    [mapEvent.point.x + buffer, mapEvent.point.y + buffer]
  ];
}
function mapEventToBoundingBox ( mapEvent , buffer = 0 ) { return [ [ mapEvent . point . x - buffer , mapEvent . point . y - buffer ] , [ mapEvent . point . x + buffer , mapEvent . point . y + buffer ] ] ; }
Returns a bounding box representing the event's location.

@param {Event} mapEvent - Mapbox GL JS map event, with a point properties.
@return {Array<Array<number>>} Bounding box.
Returns a bounding box representing the event s location .