Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top