Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/236.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
将纬度/经度传递给Google地图活动,并在Android和Java中显示多个位置_Java_Android_Google Maps - Fatal编程技术网

将纬度/经度传递给Google地图活动,并在Android和Java中显示多个位置

将纬度/经度传递给Google地图活动,并在Android和Java中显示多个位置,java,android,google-maps,Java,Android,Google Maps,是否可以启动google maps活动并传递几个纬度/经度变量,以便在地图中映射多个位置?我可以用此代码显示一个位置,但如何添加更多参数? String uri = String.format(Locale.ENGLISH, "geo:%f,%f", f11, f22); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); startActivity(intent); 但是有可能一次

是否可以启动google maps活动并传递几个纬度/经度变量,以便在地图中映射多个位置?我可以用此代码显示一个位置,但如何添加更多参数?

 String uri = String.format(Locale.ENGLISH, "geo:%f,%f", f11, f22);
 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
 startActivity(intent);               
但是有可能一次显示更多的位置吗?我应该使用mapview吗?如何使用?
谢谢。

创建lat long的arraylist,并将其传递给map activity,然后使用for Loop设置它。据我所知,内置api一次不会显示多个位置。相反,您可以使用MapView。是的,您可以在loop的帮助下完成此操作。。。