MapsV2 how to fake a click of the myLocation button

Viewed 5124

In MapsV2, I would like to programmatically perform a click of the myLocation button that appears on the top right of the map.

In previous versions of MapsV2, I could get a handle on the button by traversing the view hierarchy and then say myButton.performClick() (and also if I wanted could reposition the button on the map). But in the latest release this has stopped working so I think Google have deliberately disabled this potential.

How else can I center the map on the current location from code, as if the user had pressed the button?

1 Answers
Related