【发布时间】:2013-12-18 04:29:48
【问题描述】:
我试图在我的 android 应用程序的地图中显示一个特定的地方,我能够使用这个地方的经度和纬度在地图上显示它。然而,信息气泡并未指向该地点,而是根据经度和纬度指向该位置。
我想在给定位置显示特定位置。
这是我的代码
double latitude = some value;
double longitude = some value;
String label = "Some text";
String loc = "geo:" + latitude + "," + longitude;
String query = latitude + "," + longitude + "(" + label + ")";
String encodedQuery = Uri.encode(query);
String uriLoc = loc + "?q=" + encodedQuery + "&z=16";
Log.d(uriLoc, "no log");
Uri uri = Uri.parse(uriLoc);
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
startActivity(intent);
【问题讨论】:
标签: android google-maps