Swiftpack.co - Package - randop/GeoApi

Swift GeoApi

Circle-CI Build Status Travis-CI Build Status Swift4 Platforms Swift Package Manager Compatible MIT License

Installation with SPM on Swift 4

import PackageDescription

let package = Package(
    name: "MyProject",
    dependencies: [
        .package(url: "https://github.com/randop/GeoApi.git", from: "1.2.0")
    ],
    targets: [
        .target(
            name: "MyProject",
            dependencies: ["GeoApi"]),
    ]
)

Usage

Address Latitude and Longitude

import GeoApi

let location = "Cardinal Rosales Ave, Cebu City, Cebu 6000, Philippines"

let client = GeoApi(apikey: "")
let (latitude, longitude) = client.geocode(address: location)

Distance Between Addresses

import GeoApi

let client = GeoApi(apikey: "")

let location1 = "Cardinal Rosales Ave, Cebu City, Cebu 6000, Philippines"
let location2 = "Jose Maria del Mar St, Apas, Cebu City, Cebu 6000, Philippines"

let distance = client.miles(from: location1, to: location2)

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

1.2.0 - Apr 3, 2018

  • Drop support for Swift 3
  • Fix test cases

1.1 - Mar 5, 2018

  • Fix Swift 3 and 4 conflicts
  • Added back Travis-CI support

1.0 - Aug 23, 2017

Introduction of Swift GeoAPI.