toExtent()

in src/lib/components/molecules/canvas-map/lib/util/bounds.js [39:58]


  toExtent() {
    const southWestLatitude = this.southWest.lat
    const northEastLatitude = this.northEast.lat
    const flippedY = southWestLatitude < northEastLatitude
    if (flippedY) {
      return new Extent(
        this.southWest.lng,
        this.southWest.lat,
        this.northEast.lng,
        this.northEast.lat,
      )
    } else {
      return new Extent(
        this.southWest.lng,
        this.northEast.lat,
        this.northEast.lng,
        this.southWest.lat,
      )
    }
  }