1.去申请app的Appkey,对百度sdk的引入和配置
2.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="listener"
type="android.view.View.OnClickListener" />
</data>
<LinearLayout
tools:context=".activity.MapNavigation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:background="@drawable/home_top_gradient_bg"
android:layout_height="48dp">
<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
android:gravity="center"
android:text="选点定位"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_sure"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_48"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:gravity="center"
android:onClick="@{listener}"
android:text="确定选点"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
<com.baidu.mapapi.map.TextureMapView
android:id="@+id/bmapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/line" />
<LinearLayout
android:id="@+id/ll_location"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
andr