读书人

Google Maps兑现绘制两点之间线条和图

发布时间: 2012-09-28 00:03:35 作者: rapoo

Google Maps实现绘制两点之间线条和图标

如果需要查看两地之间所移动的路线图,就需要在地图上绘制线条和图标来查看了,废话不多说,贴上代码!


JAVA代码:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="fill_parent"    android:layout_height="fill_parent">     <com.google.android.maps.MapView         android:id="@+id/mapsView"                 android:layout_width="fill_parent"                 android:layout_height="fill_parent"                 android:apiKey="0pbz1nfRMm_rQhNwDB4hE549_EJ86lD00BUyCNw"                 android:enabled="true"                 android:clickable="true"                 /></LinearLayout>


好了,在模拟器里面查看只需要send一下它的经纬度,手机里就需要移动至少500M才行,OK!


读书人网 >移动开发

热点推荐