I want to make an android application that uses Google Maps for Android v2.
I can show a map. I can even navigate and zoom. But, when I want to search for more oper
Is there a way of doing things like, "add marker", "show my current location", and "take position of the point that I clicked"? (using SupportMapFragment, of course. )
Yes.
Step #1: Add the Android Support package to your app.
Step #2: Have your activities inherit from FragmentActivity
from the Android Support package.
Step #3: Change all MapFragment
references (Java code and layout XML resources) to SupportMapFragment
.
And you're done.
All of my Maps V2 samples use SupportMapFragment
, in conjunction with ActionBarSherlock (which is why you will see SherlockFragmentActivity
as opposed to FragmentActivity
.