lminhtm / lmgeocoder Goto Github PK
View Code? Open in Web Editor NEWSimple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.
License: MIT License
Simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.
License: MIT License
This is amazingly easy to use. I was expecting to have to provide my own googleAPIKey
. How does it work without one? Am I going to run into problems if I don't provide it? If so, then what if I were using the Apple service? Would I need an API key for that? Thank you!
By the way, here's the swift code I'm using, in case you want to add it:
LMGeocoder.sharedInstance().geocodeAddressString(addressString, service: .GoogleService, completionHandler: { (results, error) -> Void in
if results != nil, let address = results.first as? LMAddress {
print("Coordinate: (%f, %f)", address.coordinate.latitude, address.coordinate.longitude)
} else if error != nil {
print("Geocoding error: \(error.localizedDescription)")
} else {
print("No results found")
}
})
Hello,
I am using your library but getting _subLocality null.
Can you please check for the same.
I am using the below coordinate.
(CLLocationCoordinate2D) coordinate = (latitude = 23.010400000000001, longitude = 72.515100000000004)
Thanks,
Ko get được location trên iOS 8 bạn ơi ^_^
Hello, I want to use your library for a dynamic geocoding, but can't find a way to do it
When calling either of the following two geocoding methods on a thread other than the main thread, they fail to call their completion handlers (or do anything for that matter):
- (void)geocodeAddressString:(NSString *)addressString service:(LMGeocoderService)service completionHandler:(LMGeocodeCallback)handler;
- (void)reverseGeocodeCoordinate:(CLLocationCoordinate2D)coordinate service:(LMGeocoderService)service completionHandler:(LMGeocodeCallback)handler;
A fix for this issue would allow for calls on background threads (e.g. when performing a background refresh, or to avoid blocking the UI). In the meantime, you may want to consider adding a documentation note in the header:
@note This method should only be called on the main thread. Calling this method on any other thread will fail.
Additionally, you may want to implement a runtime catch for this and write a warning to the log:
if (![NSThread isMainThread]) {
NSLog(@"[LMGeocoder] Warning, geocodeAddressString:service:completionHandler: must be called on the main thread. The completion handler will not be called.");
return;
}
Hi! Thanks for really nice component.
Could you please consider adding full original info into LMAddress object, it could be just dictionary property. So for example I need viewport coordinate received from Google API to show on map, but it's not parsed in LMAddress and there is no ability to access original Google API response.
I can submit a quick PR for this.
Thanks.
I installed using LMGeoCoder and gives me error duplicate declaration on each n every property and class.
I have recheck my complete code and there is not duplicate existence of this class.
Do anyone know what could be the issue?
Hello
I found some missing code parts.
on line 109 of LMGeocoder.m file
replace
[self parseGeocodingResponseResults:placemarks service:kLMGeocoderAppleService];
to
NSArray *finalResults = [self parseGeocodingResponseResults:placemarks service:kLMGeocoderAppleService];
if (handler) {
handler(finalResults, nil);
}
on line 207 of LMGeocoder.m file
replace
[self parseGeocodingResponseResults:placemarks service:kLMGeocoderAppleService];
to
NSArray *finalResults = [self parseGeocodingResponseResults:placemarks service:kLMGeocoderAppleService];
if (handler) {
handler(finalResults, nil);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.