jimmyjose-dev / locationmanager Goto Github PK
View Code? Open in Web Editor NEWCLLocationManager wrapper in Swift, performs location update, geocoding and reverse geocoding using Apple and Google service
License: MIT License
CLLocationManager wrapper in Swift, performs location update, geocoding and reverse geocoding using Apple and Google service
License: MIT License
Would you mind supporting CocoaPods?
Hi:
Recently, i used LocationManager to retrieve the user's current location with below codes:
var locationManager = LocationManager.sharedInstance
locationManager.showVerboseMessage = true
locationManager.autoUpdate = false
locationManager.startUpdatingLocationWithCompletionHandler { (latitude, longitude, status, verboseMessage, error) -> () in
println("lat:\(latitude) lon:\(longitude) status:\(status) error:\(error)")
println(verboseMessage)
}
But i found the completion handler never be called with no reasons.
Could you help me to figure out how make it works?
Thank you in advance.
How to set up as distanceFilter attributes as system?Don't want to have been updated.
I just spent 10 minutes trying to figure out why your documentation didn't match the LocationManager source. Its because pod 'LocationManager', ~> '1'
will download a different pod.
You should use a unique name
At the very least you should update your ReadMe to show that you need this to install your pod
pod 'LocationManager', :git => 'https://github.com/varshylmobile/LocationManager.git'
Hi,
last time there is an always error when use geocodeUsingGoogleAddressString: Over query limit.
I think you should fix it in geoCodeUsignGoogleAddress and reverseGocodeUsingGoogle functions. Just add key parameters in the url string:
https://maps.googleapis.com/maps/api/geocode/json?address=\(address)&key=API_KEY
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/varshylmobile/locationmanager/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
https://github.com/varshylmobile/LocationManager/edit/master/README.md#L261
Thanks for updating to the latest xCode release
Can I use it in Xcode 7.1 version which runs on swift 2.1 version?
(or) is there any lower version of LocationManger to support lower version of Xcode?
In some cases Google Places API returns empty types array, for example Dallas/Fort Worth International Airport. In that case type = types.firstObject as NSString crashes
{
"long_name" = 2375;
"short_name" = 2375;
types = (
"street_number"
);
},
{
"long_name" = "Dallas/Fort Worth International Airport";
"short_name" = "Dallas/Fort Worth International Airport";
types = (
);
},
{
"long_name" = "International Parkway";
"short_name" = "International Pkwy";
types = (
route
);
},
{
"long_name" = Dallas;
"short_name" = Dallas;
types = (
locality,
political
);
},
{
"long_name" = "Tarrant County";
"short_name" = "Tarrant County";
types = (
"administrative_area_level_2",
political
);
},
{
"long_name" = Texas;
"short_name" = TX;
types = (
"administrative_area_level_1",
political
);
},
{
"long_name" = "United States";
"short_name" = US;
types = (
country,
political
);
},
{
"long_name" = 75261;
"short_name" = 75261;
types = (
"postal_code"
);
}
)
Are you planning to support it for Xcode 8 or is there a workaround, I can use it in Xcode 8.
Thx
When I try to make pod install
the fileprivate func geoCodeAddress(_ address:NSString){}
caused an error due to a
warning: could not load any Objective-C class information from the dyld shared cache. This will significantly reduce the quality of type information available.
To correct it , it's enough to correct this line:
geocoder.geocodeAddressString(address as String, completionHandler: ({(placemarks: [CLPlacemark]?, error: NSError?) -> Void in
to:
geocoder.geocodeAddressString(address as String, completionHandler: ({(placemarks: [CLPlacemark]?, error: Error?) -> Void in
You can find more details also here in SO
You also don't need to force casting to as! CLGeocodeCompletionHandler
, so it can be removed.
Needs to be updated for Swift 2.
I already made the changes, but I can't commit
In Swift 2.1 I have 2 problem:
please correct it
Too many errors for PromiseKit by Swift5
build errors
syntax erros
2014-12-21 01:47:22.945 LocationManagerDemo[1043:662184] * Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection <__NSArrayM: 0x1c824d30> was mutated while being enumerated.'
*** First throw call stack:
(0x2946249f 0x36c58c8b 0x29461f21 0x33f4ee59 0x33fd8715 0x33fd1455 0x5a19db 0x5a9e29 0x5a42c9 0x5ab567 0x5ab355 0x3731be93 0x3731be07 0x37319b90)
The problem starts here : self.mapView?.setRegion(theRegion, animated: true)
Hi,
Thanks a lot for your work. Juste to notify that you specify
pod 'VMLocationManager', '~> 1.0.0'
in the documentation instead of
pod 'LocationManager', '~> 1.0.0'
Have a nice day !
Tom
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.