Relocate Google logo in MapView

dzeikei picture dzeikei · Aug 3, 2011 · Viewed 19.1k times · Source

I have two buttons at each bottom corners of the MapView, partly obscuring the google logo in the bottom-left corner.

In order to comply with the terms and conditions of the API, I need to relocate the google logo to somewhere more visible. i.e. above the button.

The google API doc states that the google logo is drawn in the onDraw() method of MapView but I have no idea how to override it properly since google maps is closed source.

I could do this in iPhone by finding the correct UIView in the MKMapView's children but I can't figure out how I could do this in Android.

Answer

dzeikei picture dzeikei · Dec 3, 2013

Google Maps SDK v2 for Android adds this functionality.

Use GoogleMap.setPadding() to add padding to the "active" area (including the Google logo and copyright notices) while still filling the full container.

https://developers.google.com/maps/documentation/android/map#map_padding