【发布时间】:2020-11-21 13:43:48
【问题描述】:
我创建了一个按钮,可将用户带到 Google 地图上的特定位置。这是sn-p:
String uri = String.format(Locale.ENGLISH, "geo:%f,%f", latitude, longitude);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
context.startActivity(intent);
但是,地图只是缩放到特定位置,而没有在我放置的坐标上添加标记。有人可以帮帮我吗?
谢谢。
【问题讨论】:
-
你试过这样的 uri maps.googleapis.com/maps/api/…" + myLatitude + "," + myLongitude + "&fov=90&heading=235&pitch=10&sensor=false