在上一篇的基础上进行开发
一、布局文件
使用了LBS提供的地图View控件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/position_text_view"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"/>
<com.baidu.mapapi.map.MapView
android:id="@+id/bmapView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5"
android:clickable="true"/>
</LinearLayout>
二、MainActivity.java
public class MainActivity extends AppCompatActivity {
public LocationClient mLoacationClient;
private TextView positionText;