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
To run the example project, clone the repo, and run pod install
from the Example directory first.
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]
*/
GeoJSON is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "GeoJSON"
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"))
]
Lonnie Gerol (@lontronix)
Harlan Haskins (@harlanhaskins)
GeoJSON is available under the MIT license. See the LICENSE file for more info.