Skip to content

Commit

Permalink
updated offsetting the bounds method
Browse files Browse the repository at this point in the history
  • Loading branch information
Asheshp23 committed Nov 7, 2022
1 parent 05eb6a5 commit 687d21e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Sources/GeoJSONSwiftHelper/GeoJSONSwiftHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,15 @@ extension GeoJSONObject {
}

let maxNE =
CLLocationCoordinate2D(latitude: maxN + leftoffset,
longitude: maxE + topOffset)
CLLocationCoordinate2D(latitude: maxN,
longitude: maxE)
.movedBy(latitudinalMeters: topOffset,
longitudinalMeters: leftoffset)
let maxSW =
CLLocationCoordinate2D(latitude: maxS + rightOffset,
longitude: maxW + bottomOffset)
CLLocationCoordinate2D(latitude: maxS,
longitude: maxW)
.movedBy(latitudinalMeters: bottomOffset,
longitudinalMeters: rightOffset)
let bounds = CoordinateBounds(southwest: maxSW,
northeast: maxNE)
return bounds
Expand Down

0 comments on commit 687d21e

Please sign in to comment.