【发布时间】:2020-03-11 08:57:04
【问题描述】:
我想使用地理显示一些标记:意图在指定位置和缩放级别显示地图。但我不知道如何在这里添加我的标记?有人可以帮我解决这个问题吗?
// Creates an Intent that will load a map of San Francisco
Uri gmmIntentUri = Uri.parse("geo:37.7749,-122.4194");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);
感谢您的建议。
【问题讨论】:
-
但是在这里我需要一个 Google Api Key。我想在上面的地图上放一些标记,只放坐标。这只适用于您的解决方案和 api-Key 吗?
-
发现了一个类似的问题here
标签: android dictionary android-intent geolocation google-maps-markers