gpt4 book ai didi

android - 如何删除谷歌地图应用上的 "provided by ..."标签

转载 作者:行者123 更新时间:2023-11-29 19:15:58 28 4
gpt4 key购买 nike

enter image description here

你好,

我以 Intent 打开 Google map 应用到特定位置。是否可以删除左下角提供的标签(在屏幕截图中的红色圆圈中)?

我在 Android 上使用此方法将 Google map 打开到特定位置:

    /**
* Open Google Maps to specific coordinates and show the name of the place with the label
* @param context the {@link Context}
* @param latitude the latitude
* @param longitude the longitude
* @param label the name of the place
*/
public static void openGoogleMaps(Context context, double latitude, double longitude, String label) {
String uriBegin = "geo:" + latitude + "," + longitude;
String query = latitude + "," + longitude + "(" + label + ")";
String encodedQuery = Uri.encode(query);
String uriString = uriBegin + "?q=" + encodedQuery + "&z=16";
Uri uri = Uri.parse(uriString);
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
context.startActivity(intent);
}

最佳答案

您必须稍微更改您的查询。现在你的 uri 是

geo:lat,lng?q=lat,lng(label)

将其更改为

geo:lat,lng?q=label

documentation不是很清楚什么时候添加provided by信息。可能是当您通过括号添加自己的标签时。

这里的技巧是避免添加您自己的标签,而是将其用作搜索查询。根据您使用的标签,Google 应该足够聪明,无论如何都能找到那个地方,并显示本地化标签。

关于android - 如何删除谷歌地图应用上的 "provided by ..."标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43497127/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com