【问题标题】:Android Maps API V2 Google Copyrights Notice Not Visible in Map ViewAndroid Maps API V2 Google 版权声明在地图视图中不可见
【发布时间】:2015-10-02 01:22:34
【问题描述】:

我正在努力确保 Google 地图版权声明始终显示在地图上,但实际上并没有。

仅显示 Google 徽标。我也尝试设置地图填充,但这似乎没有帮助。

要求版权声明应在地图中可见(https://developers.google.com/maps/terms 的第 8.5 节)

我正在使用适用于 Android 的 Google Maps API V2。

有没有人遇到过这个问题,你是如何解决的?

【问题讨论】:

    标签: android google-maps


    【解决方案1】:

    您可以调用作为 google play 服务的一部分的开源软件许可证信息,并使用操作栏或设置菜单中的菜单项显示它...

    像这样:

    String LicenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo( getApplicationContext()); AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(MainActivity.this); LicenseDialog.setTitle("Legal Notices"); LicenseDialog.setMessage(LicenseInfo); LicenseDialog.show(); return true;

    我使用这种方法遇到的问题是字符串很大并且需要永远加载......

    编辑: 一个更快的方法是让它在 webview 中加载:

    String LicenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(act); LicenseInfo = LicenseInfo.replace("\n", "<br>"); AlertDialog.Builder alert = new AlertDialog.Builder(act); alert.setTitle("Legal Notices"); WebView wv = new WebView(act); wv.loadData(LicenseInfo, "text/html; charset=utf-8", "UTF-8"); alert.setView(wv); alert.setNegativeButton("Close", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); alert.show();

    【讨论】:

    • 谢谢贾斯汀。抱歉,我只是看了你的答案,但会尝试一下
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-17
    • 2013-03-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多