I have a fully working GoogleMap
and I can show my userlocation with the call
mMap.setMyLocationEnabled(true);
What I want to accomplish is the functionality of the actual click on the button that now appears on the GoogleMap
(I.e animating the map to the userlocation with correct zoom etc).
The functionality is there in the GoogleMap-object already, how do I use it?
I do not want to use a LocationListener
or such to accomplish this, I just want to "call the same code" that gets called when I click the button on the map. Can it be that simple?
Thanks in advance.
EDIT:
What I basically want to do is to center the map at the user location, exactly the way that the GoogleMap centers at user location when I click the button. Like this:
GoogleMap mMap = this.getMap();
if(mMap != null) {
mMap.setMyLocationEnabled(true);
//TODO center the map on mylocation
}
EDIT:
Apparently Google is working on this. http://code.google.com/p/gmaps-api-issues/issues/detail?id=4644