Skip to content

An addition of classes to handle multiple local search queries with MKLocalSearch.

License

Notifications You must be signed in to change notification settings

harishkashyap/LocalSearchKit

Repository files navigation

LocalSearchKit

[![CI Status](http://img.shields.io/travis/Harish Krishnamurthy/LocalSearchKit.svg?style=flat)](https://travis-ci.org/Harish Krishnamurthy/LocalSearchKit) Version License Platform

Usage

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

  • Use cocoapods to setup your project. If you aren't using cocoapods then install DataStructures library for Objective-C.

  • Setup the Delegate - in your viewcontroller or model and get a sharedInstance of the LSManager:

    • LSManager *searchManager = [LSManager sharedInstance];
    • searchManager.delegate = self;
  • Start to query various search operations around a CLLocation object. If you want to run a search operation for restaurants and theaters then:

    • [searchManager startOperationForQuery:@"restaurants" atLocation:location];
    • [searchManager startOperationForQuery:@"theaters" atLocation:location];
  • The searchResponse method will receive the LSMapItems that contain the boundingRegion as well as the MKMapItems.

    • (void)searchResponse:(LSMapItem *)mapItem forQuery:(NSString *)query

Requirements

LocalSearchKit requires DataStructures library. You can install DataStructures through cocoapods.

Installation

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

pod "LocalSearchKit"

Author

Harish Krishnamurthy, hkashyap@icloud.com

License

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

About

An addition of classes to handle multiple local search queries with MKLocalSearch.

Resources

License

Stars

Watchers

Forks

Packages

No packages published