Reputation: 20143
I am building an Android application that shows the user his/her current location (using MyLocationOverlay), and I am also using a LocationManager/LocationListener to get the user's location every 15 seconds, which is then used to query a web service and in return I plot points using an ItemizedOverlay.
This is all working with no problems.
Should I be using BOTH MyLocationOverlay as well as LocationManager/LocationListener, however? It seems redundant. What would you do? From what I can see, MyLocationOverlay uses the LocationManager in the background to constantly receive location updates, anyway.
Thanks!
Upvotes: 2
Views: 503
Reputation: 25058
The MyLocationOverlay does a little more such as adding the overlay to the map, showing the error radius and making it cool and blinky! There is nothing wrong with using it in conjunction with getting your own updates. In my app I decided not to use it because I wanted to change the way that it looked so that it was more like what you see in the Maps app where the MyLocationOverlay is an arrow that shows what direction you're facing. It's really a matter of preference.
Upvotes: 4