当人们在EditText
部分按下 Button
我希望 map 转到该位置。如果有人有任何关于如何这样做的信息,甚至是教程,我们将不胜感激。
谢谢。
最佳答案
String uri = "geo:"+ latitude + "," + longitude;
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));
或带有地址:
geo:latitude,longitude
geo:latitude,longitude?z=zoom
geo:0,0?q=my+street+address
geo:0,0?q=business+near+city
http://developer.android.com/guide/appendix/g-app-intents.html
例如:
Uri uri = Uri.parse("geo:38.899533,-77.036476");
Intent it = new Intent(Intent.Action_VIEW,uri);
startActivity(it);
用于导航:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + location));
startActivity(i);
关于android - 使用 maps api android sdk 搜索位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6271416/