重新定位谷歌徽标图形页面 [英] Relocate Google logo in MapView

查看:158
本文介绍了重新定位谷歌徽标图形页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在图形页面的每一个底角的两个按钮,部分模糊的谷歌标志的左下角。

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

为了遵守的条款和API的情况下,我需要谷歌的标志搬迁到什么地方更为明显。即上面的按钮。

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.

在谷歌API文档指出,谷歌的标志画在图形页面,但我的的OnDraw()方法不知道如何来覆盖它正确,因为谷歌地图是闭源。

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.

我可以通过找到正确的的UIView 的MKMapView的的孩子,但我不这样做在iPhone如何我可以在Android中做到这一点。

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.

推荐答案

谷歌地图SDK V2为Android添加此功能。

Google Maps SDK v2 for Android adds this functionality.

使用 GoogleMap.setPadding()来添加填充到激活区域(包括谷歌的标志和版权声明),同时还填补了完整的容器。

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

<一个href="https://developers.google.com/maps/documentation/android/map#map_padding">https://developers.google.com/maps/documentation/android/map#map_padding

这篇关于重新定位谷歌徽标图形页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆