【发布时间】:2019-07-31 08:55:25
【问题描述】:
由于我的 Google 地图应用最近更新,现在是版本 10.11.1,以下代码未按预期显示标签 documented,并且以前可以正常工作:
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("geo:38.8951,100.0364?q=38.8951,100.0364(foo)")).setPackage("com.google.android.apps.maps")
if (intent.resolveActivity(packageManager) == null) {
intent.setPackage(null)
}
startActivity(intent)
这个版本也没有(0,0 紧跟在geo: 之后):
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=38.8951,100.0364(foo)")).setPackage("com.google.android.apps.maps")
if (intent.resolveActivity(packageManager) == null) {
intent.setPackage(null)
}
startActivity(intent)
official documentation 中的示例代码也没有显示标签:
// Display a label at the location of Google's Sydney office
Uri gmmIntentUri = Uri.parse("geo:0,0?q=-33.8666,151.1957(Google+Sydney)");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);
【问题讨论】:
-
已确认 - 适用于 10.10.1,不适用于 10.12.1。
-
@xinaiz 感谢您的确认。不幸的是,我找不到任何有意义的方式向 Google 报告此错误。他们的地图团队将责任推给了应用程序团队,并且该应用程序没有传统的错误报告系统,可供多人投票。如果您知道任何通知 Google 的方法,请告诉我。
-
我自己刚刚遇到它,并注意到我的模拟器中的旧地图应用程序正在显示标签,但我今天手机中的最新版本完全忽略了标签。
-
今天标签在最新版本的谷歌地图上运行良好,但是当我试图立即再次检查时,标签消失了。
-
2020 年 6 月问题依然存在。
标签: java android google-maps kotlin google-maps-markers