第一篇博客,,近期遇到一个关于地图选点显示地理位置与自定义回到定位按钮的需求, 以前做过,也是参考大神们的经验,之所以写出来就是为了把遇到的坑写一下,文笔不好,请谅解
百度地图api 貌似是没有显示这个定位按钮的,只能自己写,
布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:top="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:text="城市:"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="佛山市"
android:id="@+id/city_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:text="地址:"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="佛山市南海桂城镇"
android:id="@+id/address_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<RelativeLayout
android:layout_width&#