cllocationmanager

How to find the lat long from a city name [closed]

萝らか妹 提交于 2019-12-08 13:56:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a city name but not the lat long values for that city. How would I go about getting the lat and long values from a city name and then save it to a variable in iOS? I've seen the geo reverse coding but the examples I've seen do the opposite to what I'm looking for (they find the city name from the lat/lon)

Problems Trying to Find User Location in MKMapView

依然范特西╮ 提交于 2019-12-08 11:56:32
问题 I am having problems trying to get the user's current position to display on an MKMapView. Here is the relevant code: Header: // ParkingMapViewController.m #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> @interface ParkingMapViewController : UIViewController <MKMapViewDelegate, CLLocationManagerDelegate> { MKMapView *mapView; CLLocationManager *locationManager; } @property (nonatomic, retain) IBOutlet MKMapView *mapView; @property (nonatomic, retain) CLLocationManager *locationManager; -

iOS 11 - Location update not received after adding delegate

天大地大妈咪最大 提交于 2019-12-08 11:48:23
问题 I have been having trouble with location services in iOS 11 for both "Allow while Use" and "Always Allow". Works without issue in iOS < 11. Followed this thread in trying to fix but still doesn't work. What am I missing? Thank you in advance. I have UITabViewController in my app and a UINavigationController inside each tab. I have a singleton LocationManager class. I'm setting my UINavigationController's RootViewController as delegate the ViewController's viewWillAppear to receive location

CLLocationManager only monitors regions the first time the app is run after install

爱⌒轻易说出口 提交于 2019-12-08 07:35:42
问题 I have an iOS app which is a tabbed application, with 3 view controllers, all of which need to know when the phone enters specific geographical regions. The regions which we monitor for are supplied at run time over a web interface, so we need to periodically clear the regions that the CLLocationManager is monitoring for and add new ones. The CLLocationManager object is a member variable of a singleton class which manages the connection with the web server as well. The problem that I have is

didUpdateToLocation doesn't gets called immediately

青春壹個敷衍的年華 提交于 2019-12-08 07:26:43
问题 I am using startMonitoringSignificantLocationChanges for getting the (lat,lon) values.My problem is (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation method doesn't gets called immediately after [locationMangerObject startMonitoringSignificantLocationChanges]; is encountered.Inside didUpdateToLocation method only i maintain two global double variables for holding latitude and longitude which will be set from

CLLocationManager holds cache value

冷暖自知 提交于 2019-12-08 05:35:47
问题 This part of code of CLLocationManager is used to calculate the distance travelled. But the location cache is not removed even after using timeIntervalSinceNow . - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { if(newLocation != nil && oldLocation != newLocation) { tempNewLocation = newLocation; tempOldLocation = oldLocation; } NSLog(@"New Location Found"); NSLog(@"- Latitude: %f", newLocation

Reducing the threshold of didEnterRegion

点点圈 提交于 2019-12-08 05:14:03
问题 I'm currently working on an app that I want for my app to detect a beacon in background mode just when it gets close to it(Immediate). Based on articles that I've read it cannot be done with didEnterRegion and I should use ranging while it's running in the background mode(Location Update). is there any solution that directly reduces the didEnterRegion threshold? or Should I use the other method? and if that's the case does it work like didEnterRegion but with a limited range of RSSI? does it

can i show gps location pop message again?

走远了吗. 提交于 2019-12-08 04:36:27
问题 i have application in this application i want to display sorting data using user's location. but first time when i open application it ask me for allow or not allow for location. i press don't allow. this never ask me again for location how can i rest this setting. 回答1: ya you can do this by going on this way settings >> general >> reset >>Reset Location warnings by this doing it will ask again same warning . may be this help you 回答2: First option : Then you had to use a button in your app

can i show gps location pop message again?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 04:20:39
i have application in this application i want to display sorting data using user's location. but first time when i open application it ask me for allow or not allow for location. i press don't allow. this never ask me again for location how can i rest this setting. ya you can do this by going on this way settings >> general >> reset >>Reset Location warnings by this doing it will ask again same warning . may be this help you First option : Then you had to use a button in your app where user can update his location again by pressing the button. Second Option : Call update location method after

locationManager avoid (null) string in a Label

隐身守侯 提交于 2019-12-08 03:55:05
问题 I have some code that find the user location and return it into a Label. In some case, the subAdministrativeArea is not available or the thoroughfare and I want to modify my string so it doesn't show (null). I tried with some if to check this but there is a problem if the (null) are more than one. Anyone has an idea about this? Here is my current code that needs to be modified to detect if a placemark object is equal to null: - (void)locationManager:(CLLocationManager *)manager