Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lminhtm/LMGeocoder
Simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.
https://github.com/lminhtm/LMGeocoder
geocode geocoder geocoding ios objective-c reverse-geocode reverse-geocoding swift
Last synced: 3 months ago
JSON representation
Simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.
- Host: GitHub
- URL: https://github.com/lminhtm/LMGeocoder
- Owner: lminhtm
- License: mit
- Created: 2014-06-01T15:53:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T13:17:02.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T22:20:08.744Z (7 months ago)
- Topics: geocode, geocoder, geocoding, ios, objective-c, reverse-geocode, reverse-geocoding, swift
- Language: Objective-C
- Homepage:
- Size: 4.01 MB
- Stars: 139
- Watchers: 9
- Forks: 38
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LMGeocoder
LMGeocoder is a simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.[![CI Status](https://img.shields.io/travis/LMinh/LMGeocoder.svg?style=flat)](https://travis-ci.org/LMinh/LMGeocoder)
[![Version](https://img.shields.io/cocoapods/v/LMGeocoder.svg?style=flat)](https://cocoapods.org/pods/LMGeocoder)
[![License](https://img.shields.io/cocoapods/l/LMGeocoder.svg?style=flat)](https://cocoapods.org/pods/LMGeocoder)
[![Platform](https://img.shields.io/cocoapods/p/LMGeocoder.svg?style=flat)](https://cocoapods.org/pods/LMGeocoder)![](https://raw.github.com/lminhtm/LMGeocoder/master/Screenshots/screenshot.png)
## Features
* Wrapper for Geocoding and Reverse geocoding with blocked-based coding.
* Use both Google Geocoding API and Apple iOS Geocoding Framework.## Requirements
iOS 8.0 or higher## Installation
LMGeocoder is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'LMGeocoder'
```## Swift Version
https://github.com/lminhtm/LMGeocoderSwift## Usage
#### Geocoding
```ObjC
[[LMGeocoder sharedInstance] geocodeAddressString:addressString
service:LMGeocoderServiceGoogle
alternativeService:LMGeocoderServiceApple
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
```ObjC
[[LMGeocoder sharedInstance] reverseGeocodeCoordinate:coordinate
service:LMGeocoderServiceGoogle
alternativeService:LMGeocoderServiceApple
completionHandler:^(NSArray *results, NSError *error) {
if (results.count && !error) {
LMAddress *address = [results firstObject];
NSLog(@"Address: %@", address.formattedAddress);
}
}];
```#### Cancel Geocode
```ObjC
[[LMGeocoder sharedInstance] cancelGeocode];
```## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.## License
LMGeocoder is available under the MIT license. See the LICENSE file for more info.## Author
Minh Nguyen
* https://github.com/lminhtm
* [email protected]