Yos233 Yos233 - 4 months ago 18
Android Question

How to display my location on Google Maps for Android API v2

I've looked high and low for an answer on this, and no one, in any forum question has been able to help. I've searched through the tutorials. The API Guide says:

The My Location button appears in the top right corner of the screen
only when the My Location layer is enabled.

So I've been looking for this My Location layer and have been unable to find anything. How do I show my location on a Google Map?


The API Guide has it all wrong (really Google?). With Maps v2 you do not need to enable a layer to show yourself, there is a simple call to the GoogleMaps instance you created with your map.

Google Documentation

The actual documentation that Google provides gives you your answer. Call

// map is a GoogleMap object

and watch the magic happen.