使用Eclipse在地图上的两个点之间绘制路径 [英] Draw path between two points on the map-google maps using Eclipse
本文介绍了使用Eclipse在地图上的两个点之间绘制路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在android google map v2中编写程序。
我创建了标记为ArrayList
现在,我想在地图上的两个点之间找到街道怎么样 ???
帮助我!
谢谢 使用以下代码:
/ **************************绘制折线如果存在多于一个的经验值************** /
if(arraylist_lat_lon.size()> 1){
PolylineOptions polyline_options = new PolylineOptions()
.addAll(arraylist_lat_lon).color(Color.GREEN).width(2);
polyline = googleMap.addPolyline(polyline_options);
$ b
注意: arraylist_lat_lon :Array列出您要存储LatLng的位置
I'm writing program in android google map v2 .
I created markers as ArrayList
Now, I want to find the street, between two points on the map how ???
Help me !!
Thanks
解决方案
Use the Following Code:-
/************************** Drawing polyline if there are more than 1 latlngs **************/
if (arraylist_lat_lon.size() > 1) {
PolylineOptions polyline_options = new PolylineOptions()
.addAll(arraylist_lat_lon).color(Color.GREEN).width(2);
polyline = googleMap.addPolyline(polyline_options);
}
Note: arraylist_lat_lon : Array List where you are storing your LatLngs
这篇关于使用Eclipse在地图上的两个点之间绘制路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文