Latest 1.0.9
Homepage https://github.com/lminhtm/LMGeocoder
License MIT
Platforms ios 7.0, requires ARC
Authors

LMGeocoder is a simple wrapper for geocoding and reverse geocoding dynamically from user input. It is blocked-based geocoder, use both Google Geocoding API and Apple iOS Geocoding Framework.

Features

  • Wrapper for Geocoding and Reverse geocoding with blocked-based coding.
  • Use both Google Geocoding API and Apple iOS Geocoding Framework.

Requirements

  • iOS 7.0 or higher
  • ARC

Installation

From CocoaPods

pod 'LMGeocoder'

Manually

  • Drag the LMGeocoder folder into your project.
  • Add the CoreLocation.framework to your project.
  • Add #import "LMGeocoder.h" to the top of classes that will use it.

Usage

Geocoding

[[LMGeocoder sharedInstance] geocodeAddressString:addressString
                                          service:kLMGeocoderGoogleService
                                completionHandler:^(NSArray *results, NSError *error) {
                                    if (results.count && !error) {
                                        LMAddress *address = [results firstObject];
                                        NSLog(@"Coordinate: (%f, %f)", address.coordinate.latitude, address.coordinate.longitude);
                                    }
                                }];

Reverse Geocoding

[[LMGeocoder sharedInstance] reverseGeocodeCoordinate:coordinate
                                              service:kLMGeocoderGoogleService
                                    completionHandler:^(NSArray *results, NSError *error) {
                                        if (results.count && !error) {
                                            LMAddress *address = [results firstObject];
                                            NSLog(@"Address: %@", address.formattedAddress);
                                        }
                                    }];

Cancel Geocode

[[LMGeocoder sharedInstance] cancelGeocode];

See sample Xcode project in /LMGeocoderDemo

License

LMGeocoder is licensed under the terms of the MIT License.

Contact

Minh Luong Nguyen

Projects using LMGeocoder

Feel free to add your project here

Donations

paypal

Latest podspec

{
    "name": "LMGeocoder",
    "version": "1.0.9",
    "summary": "Simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.",
    "homepage": "https://github.com/lminhtm/LMGeocoder",
    "platforms": {
        "ios": "7.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "LMinh": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lminhtm/LMGeocoder.git",
        "tag": "1.0.9"
    },
    "source_files": "LMGeocoder/*.{m,h}",
    "requires_arc": true
}

Pin It on Pinterest

Share This