iPhone Development: CoreLocation and MapKit

1.3k views Asked by At

How bad is it to use Location Manager to retrieve the location information when MapView.showUserLocation is also TRUE?

I have a situation where i want to show the blue dot to indicate the user's current location, and i want to record the user's current location after some time interval. Having said that, there may be situations where the user's current location is now being shown, but i still want to get the user's current location.

I think i'll have to use the Location Manager in my controller class, but setting showUserLocation = YES would mean that i'll be draining more battery since two Location Managers are working at the same time? Is this assumption correct?

2

There are 2 answers

0
Mustafa On BEST ANSWER

As discussed on other communities, you can have mapView.showUserLocation = YES and still use CLLocationManager to retrieve the most current location information.

In general there's no conflict involved with having multiple CLLocationManager instances running at the same time.

0
Luuk van Rens On

Just save the coordinates in an array and draw mapannotations for past recorded locations. You dont need to run multiple location managers.