Latest 1.0.2
Homepage https://github.com/pelias/pelias-ios-sdk
License Apache License, Version 2.0
Platforms ios 9.3, osx 10.11, requires ARC
Authors

Pelias iOS SDK CircleCI

This is the iOS SDK wrapper and convenience framework to make interacting with a
Pelias Geocoder instance (https://github.com/pelias/pelias) easier / faster /
more better for iOS developers.

Recommended Installation Method

We recommend using CocoaPods (https://cocoapods.org/) to install the SDK. We have
two currently supported subspecs: Core and MapkitExtensions. Core only relies on
Foundation being available. MapkitExtensions relies on CoreLocation, MapKit, and
the iOS 9.0+ Contacts Framework being available (and will add these to your project
if you install using CocoaPods).

Example Usage

Here are some examples which show how easy it is to use the SDK. Be sure to read the documentation to see all the properties you can customize when making requests.

Search

Find a place by searching for an address or name:

let text = "cafe"
let config = PeliasSearchConfig(searchText: text, completionHandler: { (searchResponse) -> Void in
  let responseDictionary = searchResponse.parsedResponse?.parsedResponse
  // update UI based on responseDictionary
})
_ = PeliasSearchManager.sharedInstance.performSearch(config)

Autocomplete

Get real-time result suggestions with autocomplete:

let text = "cafe"
let point = GeoPoint.init(latitude: 40.74433, longitude: -73.9903)
let config = PeliasAutocompleteConfig(searchText: text, focusPoint: point, completionHandler: { (searchResponse) -> Void in
  let responseDictionary = searchResponse.parsedResponse?.parsedResponse
   // update UI based on responseDictionary
})
_ = PeliasSearchManager.sharedInstance.autocompleteQuery(config)

Reverse

Find what is located at a certain coordinate location:

let point = GeoPoint.init(latitude: 40.74433, longitude: -73.9903)
let config = PeliasReverseConfig(point: point, completionHandler: { (searchResponse) -> Void in
  let responseDictionary = searchResponse.parsedResponse?.parsedResponse
  // update UI based on responseDictionary
})
_ = PeliasSearchManager.sharedInstance.reverseGeocode(config)

Place

Get rich details about a place:

let gids = ["gid", "anotherGid"]
let config = PeliasPlaceConfig(gids: gids, completionHandler: { (searchResponse) -> Void in
  let responseDictionary = searchResponse.parsedResponse?.parsedResponse
  // update UI based on responseDictionary
})
_ = PeliasSearchManager.sharedInstance.placeQuery(config)

Sample App

The SDK ships with a sample app which you can run directly within XCode

Reporting Issues

We welcome issues to be reported using the Github Issue tracker. However please
review the currently open issues before reporting a bug to avoid issue tracker churn.

Contributing

Please send any and all PRs you want! We do enforce good test coverage,
so please make sure all your new code is covered, and that tests pass locally before
submitting a pull request!

Changelog

Please refer to the CHANGES.md document for major change history of the SDK.

Latest podspec

{
    "name": "Pelias",
    "version": "1.0.2",
    "summary": "A distributed full-text geographic search engine. An open source project sponsored by Mapzen.",
    "homepage": "https://github.com/pelias/pelias-ios-sdk",
    "social_media_url": "https://twitter.com/mapzen",
    "authors": {
        "Matt Smollinger": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pelias/pelias-ios-sdk.git",
        "tag": "v1.0.2"
    },
    "license": "Apache License, Version 2.0",
    "requires_arc": true,
    "platforms": {
        "ios": "9.3",
        "osx": "10.11"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "default_subspecs": "Core",
    "pushed_with_swift_version": "3.0",
    "subspecs": [
        {
            "name": "Core",
            "source_files": "Sources/Core/*.swift"
        }
    ]
}

Pin It on Pinterest

Share This