Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何创建一个按钮,将您带到特定位置的谷歌地图应用程序?_Android_Google Maps - Fatal编程技术网

Android 如何创建一个按钮,将您带到特定位置的谷歌地图应用程序?

Android 如何创建一个按钮,将您带到特定位置的谷歌地图应用程序?,android,google-maps,Android,Google Maps,我有一个简单的安卓按钮 <Button android:id="@+id/btnTakeMeThere" android:background="#00FF00" android:text="Take me there!" ... /> 可能想看看这些意图。 var latitude, longitude: Float; btnTakeMeThere.setOnClickListener { } Uri uri = Uri.parse("geo

我有一个简单的安卓按钮

<Button
    android:id="@+id/btnTakeMeThere"
    android:background="#00FF00"
    android:text="Take me there!"
    ...
/>

可能想看看这些意图。
var latitude, longitude: Float;

btnTakeMeThere.setOnClickListener {

}
Uri uri = Uri.parse("geo:[lat],[long]?z=17[zoom]&q=[text]");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);