Swiftpack.co - bryx-inc/GeoJSON.swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by bryx-inc.
bryx-inc/GeoJSON.swift 0.4.0
A GeoJSON model for Swift.
⭐️ 33
🕓 1 year ago
iOS
.package(url: "https://github.com/bryx-inc/GeoJSON.swift.git", from: "0.4.0")

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.

GitHub

link
Stars: 33
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Swift 4 Support
5 years ago

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