如果我有纬度和经度,我想打开谷歌地图到那个特定的位置我该怎么办?哪个意图启动具有给定纬度和经度的谷歌地图显示? 我有这个意图,但这个意图寻找导航...我只希望它显示给定纬度和经度的位置
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr=" + lat
+ "," + lon));
intent.setClassName("com.google.android.apps.maps",
"com.google.android.maps.MapsActivity");
答案 0 :(得分:0)
String uriName = "geo:"+ lat+ "," + lon;
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));
它将显示纬度和经度地图
具体位置:
String uriName = "geo:"+ lat+ "," + lon+ "?q=my+street+address";
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uriName)));