Swiftpack.co - Package - petrpavlik/GeoSwift

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
Help us keep the lights on

Dependencies

Used By

Total: 1

Releases

1.0.4 - Feb 23, 2018

1.0.3 - Oct 26, 2017

1.0.2 - Oct 23, 2016

Fix a typo

1.0.1 - Oct 8, 2016

Fix unit tests on Ubuntu