How do I get a notification when a user clicks the "Center" button on my "Location" in Google Maps v2 for Android API

I cannot find a notification method when users click this button, which appears when setMyLocationEnabled is setMyLocationEnabled .

+4
source share
1 answer

Google Maps Android API v2 does not currently support this event.

See the code in the My Tracks app for a workaround

https://code.google.com/p/mytracks/source/browse/MyTracks/src/com/google/android/apps/mytracks/fragments/MyTracksMapFragment.java

  /* * My Tracks needs to handle the onClick event when the my location button * is clicked. Currently, the API doesn't allow handling onClick event, * thus hiding the default my location button and providing our own. */ 
+1
source

All Articles