Stunner
Stunner

Reputation: 12224

How to Add Location Pinpoint to MapView in Android

been scouring Google for hours and the Android docs to no avail. I have successfully got a map view to display, but need to add a location pinpoint button in the upper-right corner of the map view (as seen in the official Android maps app). I am looking for code samples as I am very new to the whole Android world.

Coming from iOS so it is rather shocking to see that there is little to no help with regard to this. I am thinking it is either dead simple and is something I am missing, or not possible...

Thanks in advance!

Upvotes: 1

Views: 395

Answers (1)

ashokgelal
ashokgelal

Reputation: 81558

If you are using v2, then all you need to do is add:

getMap().setMyLocationEnabled(true);

in your onViewCreated() method (add it at the end).

Upvotes: 1

Related Questions