Swiftpack.co - petrpavlik/GeoSwift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by petrpavlik.
petrpavlik/GeoSwift 1.0.5
Location-related APIs intended to be used by server-side Swift applications.
⭐️ 15
🕓 3 years ago
.package(url: "https://github.com/petrpavlik/GeoSwift.git", from: "1.0.5")

GeoSwift

Location-related APIs intended to be used by server-side Swift applications since there is no CoreLocation on Linux.

Build Status Latest Release Platforms Package Managers

Distance between 2 locations

do {
    let prague = try GeoCoordinate2D(latitude: 50.0880400, longitude: 14.4207600)
    let brno = try GeoCoordinate2D(latitude: 49.195060, longitude: 16.606837)

    let distancePragueBrnoInMeters = prague.distance(from: brno)
    print("Distance between Prague and Brno is \(distancePragueBrnoInMeters * 0.00062137) mi.")
} catch {
    // Tried to create an instance of `GeoCoordinate2D` with invalid coordinates.
}

Installation

Swift Package Manager

.Package(url: "https://github.com/petrpavlik/GeoSwift.git", majorVersion: 1)

License

MIT

Author

Petr Pavlik - @ptrpavlik

GitHub

link
Stars: 15
Last commit: 3 years ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Swift 5 Support
3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics