Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.77 KB

README.md

File metadata and controls

63 lines (46 loc) · 1.77 KB

GeoJSON

A GeoJSON Model for Swift 4.0. Compatible with iOS 8 and up. For earlier versions of Swift and Xcode 7 please use version 0.2.0

Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Examples

let geoJSONDictionary: [String: AnyObject] = [
    "coordinates": [-77.595453, 43.155059],
    "type": "Point"
]
guard let point = GeoJSONPoint(dictionary: geoJSONDictionary) else { return }
print(point.dictionaryRepresentation)
/*
[properties: {
}, geometry: {
    coordinates =     (
        "-77.59545300000001",
        "43.155059"
    );
    type = Point;
}, type: Feature] 
*/

Installation

CocoaPods

GeoJSON is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "GeoJSON"

Swift Package Manager

GEOJSON is also available through Swift Package Manager. To install follow these instructions or add

dependencies: [
    .package(url: "[email protected]:bryx-inc/GeoJSON.swift.git", .upToNextMajor(from: "0.4.3"))
]

Maintainer

Lonnie Gerol (@lontronix)

Author

Harlan Haskins (@harlanhaskins)

License

GeoJSON is available under the MIT license. See the LICENSE file for more info.