Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oleander/coordinate-swift

A Swift library for handling coordinates
https://github.com/oleander/coordinate-swift

Last synced: 4 days ago
JSON representation

A Swift library for handling coordinates

Awesome Lists containing this project

README

        

# Coordinate

[![Build Status](https://travis-ci.org/oleander/coordinate-swift.svg?branch=master)](https://travis-ci.org/oleander/coordinate-swift)

A Swift library for handling coordinates.

## Example

``` swift
let origin = Coordinate(
long: 100.561371,
lat: 13.822495
)

let target = Coordinate(
long: 100.613660,
lat: 13.749423
)

origin.distance(to: target) // 10.0km
```

## Install

``` swift
// swift-tools-version: 4.2
import PackageDescription

let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(
url: "https://github.com/oleander/coordinate-swift.git", .branch("master")
)
]
)
```