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.
- Wrapper for Geocoding and Reverse geocoding with blocked-based coding.
- Use both Google Geocoding API and Apple iOS Geocoding Framework.
- iOS 7.0 or higher
- ARC
pod 'LMGeocoder'
- Drag the
LMGeocoder
folder into your project. - Add the
CoreLocation.framework
to your project. - Add
#include "LMGaugeView.h"
to the top of classes that will use it.
[[LMGeocoder sharedInstance] geocodeAddressString:addressString
service:kLMGeocoderGoogleService
completionHandler:^(LMAddress *address, NSError *error) {
if (address && !error) {
NSLog(@"Coordinate: (%f, %f)", address.coordinate.latitude, address.coordinate.longitude);
}
else {
NSLog(@"Error: %@", error.description);
}
}];
[[LMGeocoder sharedInstance] reverseGeocodeCoordinate:coordinate
service:kLMGeocoderGoogleService
completionHandler:^(LMAddress *address, NSError *error) {
if (address && !error) {
NSLog(@"Address: %@", address.formattedAddress);
}
else {
NSLog(@"Error: %@", error.description);
}
}];
See sample Xcode project in /LMGeocoderDemo
LMGeocoder is licensed under the terms of the MIT License.