Explorar el Código

1.地图多路线。

石慧云 hace 4 años
padre
commit
f34a736882

+ 2 - 1
gaode/build.gradle

@@ -60,7 +60,8 @@ dependencies {
 
     // compileOnly 'com.amap.api:location:latest.integration' //定位功能
     implementation 'com.amap.api:search:latest.integration' //搜索功能
-    implementation 'com.amap.api:3dmap:latest.integration'//3D地图
+   // implementation 'com.amap.api:3dmap:latest.integration'//3D地图
+    implementation 'com.amap.api:navi-3dmap:latest.integration'//路线规划
 
     implementation 'com.githang:status-bar-compat:0.7'
     //2D地图

+ 445 - 4
gaode/src/main/java/com/quansu/gaode/activity/PolylineActivity.java

@@ -7,7 +7,9 @@ import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import androidx.annotation.Nullable;
 import androidx.appcompat.app.AppCompatActivity;
@@ -18,33 +20,67 @@ import com.amap.api.maps.model.BitmapDescriptorFactory;
 import com.amap.api.maps.model.LatLng;
 import com.amap.api.maps.model.MarkerOptions;
 import com.amap.api.maps.model.PolylineOptions;
+import com.amap.api.navi.AMapNavi;
+import com.amap.api.navi.AMapNaviListener;
+import com.amap.api.navi.enums.PathPlanningStrategy;
+import com.amap.api.navi.model.AMapCalcRouteResult;
+import com.amap.api.navi.model.AMapLaneInfo;
+import com.amap.api.navi.model.AMapModelCross;
+import com.amap.api.navi.model.AMapNaviCameraInfo;
+import com.amap.api.navi.model.AMapNaviCross;
+import com.amap.api.navi.model.AMapNaviLocation;
+import com.amap.api.navi.model.AMapNaviPath;
+import com.amap.api.navi.model.AMapNaviRouteNotifyData;
+import com.amap.api.navi.model.AMapNaviTrafficFacilityInfo;
+import com.amap.api.navi.model.AMapServiceAreaInfo;
+import com.amap.api.navi.model.AimLessModeCongestionInfo;
+import com.amap.api.navi.model.AimLessModeStat;
+import com.amap.api.navi.model.NaviInfo;
+import com.amap.api.navi.model.NaviLatLng;
 import com.amap.api.services.core.LatLonPoint;
 import com.amap.api.services.geocoder.GeocodeSearch;
 import com.githang.statusbar.StatusBarCompat;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
+import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton;
 import com.quansu.gaode.R;
 import com.quansu.gaode.utils.AMapUtil;
 import com.ysnows.base.model.PositionBean;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 /**
  * Created by shihuiyun
  * on 2020/10/15
  */
-public class PolylineActivity extends AppCompatActivity {
+public class PolylineActivity extends AppCompatActivity  {
     private AMap aMap;
     private MapView mapView;
+
+    private AMap aMapTwo;
+    private AMap aMapThree;
+    private MapView mapTwo;
+    private MapView mapThree;
+
+
+
+
+
     private ImageView imgBack;
     private TextView tvStart;
     private TextView tvEnd;
     private GeocodeSearch geocoderSearch;
-
+    private LinearLayout llBottom;
+    private QMUIRoundButton butOne;
+    private QMUIRoundButton butTwo;
+    private QMUIRoundButton butThree;
     private List<LatLng> list;
     private List<PositionBean> item;
 
+
+
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         StatusBarCompat.setStatusBarColor(this, Color.parseColor("#00ffffff"));
@@ -55,20 +91,319 @@ public class PolylineActivity extends AppCompatActivity {
          item = new Gson().fromJson(getIntent().getStringExtra("item"), new TypeToken<List<PositionBean>>() {
         }.getType());
 
-        list = showListLat(item);
+
         imgBack = findViewById(R.id.img_back);
         tvStart = findViewById(R.id.tv_start);
         tvEnd = findViewById(R.id.tv_end);
+        llBottom = findViewById(R.id.ll_bottom);
+
+        butOne = findViewById(R.id.but_one);
+        butTwo = findViewById(R.id.but_two);
+        butThree = findViewById(R.id.but_three);
         tvStart.setText(item.get(0).position);
         tvEnd.setText(item.get(item.size()-1).position);
+
+
         imgBack.setOnClickListener(v -> {
             finish();
         });
 
         mapView = (MapView) findViewById(R.id.map);
+        mapTwo = findViewById(R.id.map_two);
+        mapThree = findViewById(R.id.map_three);
         mapView.onCreate(savedInstanceState);// 此方法必须重写
-        init();
+        mapTwo.onCreate(savedInstanceState);// 此方法必须重写
+        mapThree.onCreate(savedInstanceState);// 此方法必须重写
+
+
+        butOne.setOnClickListener(view -> {
+            Toast.makeText(this,"切换路线一",Toast.LENGTH_SHORT).show();
+
+            mapView.setVisibility(View.VISIBLE);
+            mapTwo.setVisibility(View.GONE);
+            mapThree.setVisibility(View.GONE);
+
+        });
+
+        butTwo.setOnClickListener(view -> {
+            Toast.makeText(this,"切换路线二",Toast.LENGTH_SHORT).show();
+            mapTwo.setVisibility(View.VISIBLE);
+            mapThree.setVisibility(View.GONE);
+            mapView.setVisibility(View.GONE);
+        });
+        butThree.setOnClickListener(view -> {
+            Toast.makeText(this,"切换路线三",Toast.LENGTH_SHORT).show();
+
+            mapTwo.setVisibility(View.GONE);
+            mapThree.setVisibility(View.VISIBLE);
+            mapView.setVisibility(View.GONE);
+        });
+
+
+        getRoute();
+
     }
+
+
+
+
+    //获取路线 多条 三条或者一条
+    protected  List<NaviLatLng> navOne = new ArrayList<NaviLatLng>();
+    protected  List<NaviLatLng> navTwo = new ArrayList<NaviLatLng>();
+    protected  List<NaviLatLng> navThree = new ArrayList<NaviLatLng>();
+
+    public void  setShow(){
+
+
+        if(navOne.size()>0){
+            llBottom.setVisibility(View.VISIBLE);
+            butOne.setVisibility(View.VISIBLE);
+            list= getshowList(navOne);
+            init();
+
+        }
+        if(navTwo.size()>0){
+            butTwo.setVisibility(View.VISIBLE);
+            list= getshowList(navTwo);
+            initTwo();
+        }
+        if(navThree.size()>0){
+            butThree.setVisibility(View.VISIBLE);
+            list= getshowList(navThree);
+            initThree();
+        }
+
+        Log.e("-shy-", "navOne="+navOne.size());
+        Log.e("-shy-", "navTwo="+navTwo.size());
+        Log.e("-shy-", "navThree="+navThree.size());
+        if(navOne.size()==0&&navTwo.size()==0&&navThree.size()==0){
+            list = showListLat(item);
+            init();
+        }
+
+    }
+
+
+    public void  getRoute(){
+
+        // 获取导航Manager
+        AMapNavi mAMapNavi = AMapNavi.getInstance(this);
+        // 起点信息
+        List<NaviLatLng> startList = new ArrayList<NaviLatLng>();
+        startList.add(new NaviLatLng(Double.parseDouble(item.get(0).latitude),Double.parseDouble(item.get(0).longitude)));
+        // 终点信息
+        List<NaviLatLng> endList = new ArrayList<NaviLatLng>();
+        endList.add(new NaviLatLng(Double.parseDouble(item.get(item.size()-1).latitude),Double.parseDouble(item.get(item.size()-1).longitude)));
+        // 经纬度算路
+        mAMapNavi.calculateDriveRoute(startList, endList, null,
+                PathPlanningStrategy.DRIVING_MULTIPLE_ROUTES_DEFAULT);
+
+
+        mAMapNavi.addAMapNaviListener(new AMapNaviListener() {
+            @Override
+            public void onCalculateRouteSuccess(AMapCalcRouteResult aMapCalcRouteResult) {
+
+                // 获取路线数据对象
+                HashMap<Integer, AMapNaviPath> naviPaths =mAMapNavi.getNaviPaths();
+                // 绘制显示路径 遍历值
+                int i=0;
+                for (AMapNaviPath value : naviPaths.values()) {
+                    if(i==0){
+                        navOne.addAll(value.getCoordList());
+                    }
+                    if(i==1){
+                        navTwo.addAll(value.getCoordList());
+
+                    }
+                    if(i==2){
+                        navThree.addAll(value.getCoordList());
+                    }
+                    i++;
+                }
+
+                setShow();
+
+            }
+            @Override
+            public void onInitNaviFailure() {
+
+            }
+
+            @Override
+            public void onInitNaviSuccess() {
+
+            }
+
+            @Override
+            public void onStartNavi(int i) {
+
+            }
+
+            @Override
+            public void onTrafficStatusUpdate() {
+
+            }
+
+            @Override
+            public void onLocationChange(AMapNaviLocation aMapNaviLocation) {
+
+            }
+
+            @Override
+            public void onGetNavigationText(int i, String s) {
+
+            }
+
+            @Override
+            public void onGetNavigationText(String s) {
+
+            }
+
+            @Override
+            public void onEndEmulatorNavi() {
+
+            }
+
+            @Override
+            public void onArriveDestination() {
+
+            }
+
+            @Override
+            public void onCalculateRouteFailure(int i) {
+
+            }
+
+            @Override
+            public void onReCalculateRouteForYaw() {
+
+            }
+
+            @Override
+            public void onReCalculateRouteForTrafficJam() {
+
+            }
+
+            @Override
+            public void onArrivedWayPoint(int i) {
+
+            }
+
+            @Override
+            public void onGpsOpenStatus(boolean b) {
+
+            }
+
+            @Override
+            public void onNaviInfoUpdate(NaviInfo naviInfo) {
+
+            }
+
+            @Override
+            public void updateCameraInfo(AMapNaviCameraInfo[] aMapNaviCameraInfos) {
+
+            }
+
+            @Override
+            public void updateIntervalCameraInfo(AMapNaviCameraInfo aMapNaviCameraInfo, AMapNaviCameraInfo aMapNaviCameraInfo1, int i) {
+
+            }
+
+            @Override
+            public void onServiceAreaUpdate(AMapServiceAreaInfo[] aMapServiceAreaInfos) {
+
+            }
+
+            @Override
+            public void showCross(AMapNaviCross aMapNaviCross) {
+
+            }
+
+            @Override
+            public void hideCross() {
+
+            }
+
+            @Override
+            public void showModeCross(AMapModelCross aMapModelCross) {
+
+            }
+
+            @Override
+            public void hideModeCross() {
+
+            }
+
+            @Override
+            public void showLaneInfo(AMapLaneInfo[] aMapLaneInfos, byte[] bytes, byte[] bytes1) {
+
+            }
+
+            @Override
+            public void showLaneInfo(AMapLaneInfo aMapLaneInfo) {
+
+            }
+
+            @Override
+            public void hideLaneInfo() {
+
+            }
+
+            @Override
+            public void onCalculateRouteSuccess(int[] ints) {
+
+            }
+
+            @Override
+            public void notifyParallelRoad(int i) {
+
+            }
+
+            @Override
+            public void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo[] aMapNaviTrafficFacilityInfos) {
+
+            }
+
+            @Override
+            public void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo aMapNaviTrafficFacilityInfo) {
+
+            }
+
+            @Override
+            public void updateAimlessModeStatistics(AimLessModeStat aimLessModeStat) {
+
+            }
+
+            @Override
+            public void updateAimlessModeCongestionInfo(AimLessModeCongestionInfo aimLessModeCongestionInfo) {
+
+            }
+
+            @Override
+            public void onPlayRing(int i) {
+
+            }
+
+
+            @Override
+            public void onCalculateRouteFailure(AMapCalcRouteResult aMapCalcRouteResult) {
+
+            }
+
+            @Override
+            public void onNaviRouteNotify(AMapNaviRouteNotifyData aMapNaviRouteNotifyData) {
+
+            }
+
+            @Override
+            public void onGpsSignalWeak(boolean b) {
+
+            }
+        });
+    }
+
+
+
     /**
      * 初始化AMap对象
      */
@@ -117,6 +452,100 @@ public class PolylineActivity extends AppCompatActivity {
                 .icon(BitmapDescriptorFactory.fromView(markerEndView)));
     }
 
+
+    private void initTwo() {
+        if (aMapTwo == null) {
+            aMapTwo = mapTwo.getMap();
+            setUpMapTwo();
+        }
+    }
+
+    private void setUpMapTwo() {
+
+        //起点位置和  地图界面大小控制
+        aMapTwo.moveCamera(CameraUpdateFactory.newLatLngZoom(list.get(0), 7));
+        aMapTwo.setMapTextZIndex(2);
+        // 绘制一条带有纹理的直线
+        aMapTwo.addPolyline((new PolylineOptions())
+                //手动数据测试
+                //.add(new LatLng(26.57, 106.71),new LatLng(26.14,105.55),new LatLng(26.58, 104.82), new LatLng(30.67, 104.06))
+                //集合数据
+                .addAll(list)
+                //线的宽度
+                .width(30).setDottedLine(true).geodesic(true)
+                //颜色
+                .color(Color.argb(255,255,20,147)));
+
+
+        if(TextUtils.isEmpty(item.get(0).latitude)||TextUtils.isEmpty(item.get(item.size()-1).latitude)){
+            return;
+        }
+        LatLonPoint latLonPoint = new LatLonPoint(Double.parseDouble(item.get(0).latitude),Double.parseDouble(item.get(0).longitude));
+
+        //起点图标
+        View markerView = LayoutInflater.from(this).inflate(R.layout.gaode_start_marker,mapView,false);
+        aMapTwo.addMarker(new MarkerOptions()
+                .position(AMapUtil.convertToLatLng(latLonPoint))
+                .icon(BitmapDescriptorFactory.fromView(markerView)));
+
+        //终点坐标
+        View markerEndView = LayoutInflater.from(this).inflate(R.layout.gaode_end_marker,mapView,false);
+
+        LatLonPoint latLonPointEnd = new LatLonPoint(Double.parseDouble(item.get(item.size()-1).latitude),Double.parseDouble(item.get(item.size()-1).longitude));
+        aMapTwo.addMarker(new MarkerOptions()
+                .position(AMapUtil.convertToLatLng(latLonPointEnd))
+                .icon(BitmapDescriptorFactory.fromView(markerEndView)));
+    }
+
+
+    private void initThree() {
+        if (aMapThree == null) {
+            aMapThree = mapThree.getMap();
+            setUpMapThree();
+        }
+    }
+
+    private void setUpMapThree() {
+
+        //起点位置和  地图界面大小控制
+        aMapThree.moveCamera(CameraUpdateFactory.newLatLngZoom(list.get(0), 7));
+        aMapThree.setMapTextZIndex(2);
+        // 绘制一条带有纹理的直线
+        aMapThree.addPolyline((new PolylineOptions())
+                //手动数据测试
+                //.add(new LatLng(26.57, 106.71),new LatLng(26.14,105.55),new LatLng(26.58, 104.82), new LatLng(30.67, 104.06))
+                //集合数据
+                .addAll(list)
+                //线的宽度
+                .width(30).setDottedLine(true).geodesic(true)
+                //颜色
+                .color(Color.argb(255,255,20,147)));
+
+
+        if(TextUtils.isEmpty(item.get(0).latitude)||TextUtils.isEmpty(item.get(item.size()-1).latitude)){
+            return;
+        }
+        LatLonPoint latLonPoint = new LatLonPoint(Double.parseDouble(item.get(0).latitude),Double.parseDouble(item.get(0).longitude));
+
+        //起点图标
+        View markerView = LayoutInflater.from(this).inflate(R.layout.gaode_start_marker,mapView,false);
+        aMapThree.addMarker(new MarkerOptions()
+                .position(AMapUtil.convertToLatLng(latLonPoint))
+                .icon(BitmapDescriptorFactory.fromView(markerView)));
+
+        //终点坐标
+        View markerEndView = LayoutInflater.from(this).inflate(R.layout.gaode_end_marker,mapView,false);
+
+        LatLonPoint latLonPointEnd = new LatLonPoint(Double.parseDouble(item.get(item.size()-1).latitude),Double.parseDouble(item.get(item.size()-1).longitude));
+        aMapThree.addMarker(new MarkerOptions()
+                .position(AMapUtil.convertToLatLng(latLonPointEnd))
+                .icon(BitmapDescriptorFactory.fromView(markerEndView)));
+    }
+
+
+
+
+
     /**
      * 方法必须重写
      */
@@ -169,6 +598,18 @@ public class PolylineActivity extends AppCompatActivity {
     }
 
 
+    public  List<LatLng>  getshowList( List<NaviLatLng> list){
+
+        List<LatLng> points = new ArrayList<LatLng>();
+
+        for(NaviLatLng ss:list){
+            points.add(new LatLng(ss.getLatitude(), ss.getLongitude()));
+        }
+
+        return points;
+
+    }
+
 
 
 }

+ 1 - 1
gaode/src/main/java/com/quansu/gaode/activity/RouteActivity.java

@@ -68,7 +68,7 @@ public class RouteActivity extends AppCompatActivity implements AMap.OnMapClickL
     protected void onCreate(@Nullable Bundle bundle) {
         StatusBarCompat.setStatusBarColor(this, Color.parseColor("#00ffffff"));
         super.onCreate(bundle);
-        setContentView(R.layout.map_layout);
+        setContentView(R.layout.map_route);
 
         PositionBean item = new Gson().fromJson(getIntent().getStringExtra("item"), PositionBean.class);
         imgBack = findViewById(R.id.img_back);

+ 0 - 1
gaode/src/main/java/com/quansu/gaode/componnent/CpGaode.java

@@ -89,7 +89,6 @@ public class CpGaode extends BIComponent implements IComponent {
         intent.putExtra("item",new Gson().toJson(item));
         intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
         BApp.instance().getApplicationContext().startActivity(intent);
-
         CC.sendCCResult(cc.getCallId(), CCResult.success());
         return false;
 

+ 106 - 23
gaode/src/main/res/layout/map_layout.xml

@@ -3,34 +3,34 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:orientation="vertical">
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:orientation="horizontal"
+        android:layout_height="50dp"
         android:gravity="center_vertical"
-        android:layout_height="50dp">
+        android:orientation="horizontal">
+
         <ImageView
             android:id="@+id/img_back"
             android:layout_width="20dp"
-            android:src="@drawable/ic_back_black"
+            android:layout_height="20dp"
             android:layout_marginStart="15dp"
-            android:layout_height="20dp"/>
-
-
-         <TextView
-             android:layout_width="match_parent"
-             android:layout_marginEnd="35dp"
-             android:text="轨迹信息"
-             android:gravity="center"
-             android:textSize="20sp"
-             android:textColor="#26292F"
-             android:layout_height="wrap_content"/>
-        
-        
-        
-    </LinearLayout>
+            android:src="@drawable/ic_back_black" />
+
 
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="35dp"
+            android:gravity="center"
+            android:text="轨迹信息"
+            android:textColor="#26292F"
+            android:textSize="20sp" />
+
+
+    </LinearLayout>
 
 
     <View
@@ -57,8 +57,8 @@
             android:id="@+id/tv_start"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
             android:layout_marginStart="10dp"
+            android:layout_weight="1"
             android:gravity="right"
             android:textColor="#26292F"
             android:textSize="15sp"
@@ -93,8 +93,8 @@
             android:id="@+id/tv_end"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
             android:layout_marginStart="10dp"
+            android:layout_weight="1"
             android:gravity="right"
             android:textColor="#26292F"
             android:textSize="15sp"
@@ -109,11 +109,94 @@
 
     </LinearLayout>
 
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1">
+
+        <com.amap.api.maps.MapView
+            android:id="@+id/map_two"
+            android:visibility="gone"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+        <com.amap.api.maps.MapView
+            android:id="@+id/map_three"
+            android:visibility="gone"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+        <com.amap.api.maps.MapView
+            android:id="@+id/map"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+
+    </FrameLayout>
 
-    <com.amap.api.maps.MapView
-        android:id="@+id/map"
+
+    <LinearLayout
+        android:id="@+id/ll_bottom"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"/>
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+        android:visibility="gone"
+        tools:visibility="visible"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        android:layout_height="50dp">
+
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+            android:id="@+id/but_one"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:text="路线一"
+            android:textSize="15sp"
+            android:textColor="@color/white"
+            app:qmui_backgroundColor="#F3AE3D"
+            app:qmui_borderColor="#F3AE3D"
+            android:visibility="gone"
+            tools:visibility="visible"
+            app:qmui_radius="20dp"
+            android:gravity="center"
+            android:layout_height="45dp"/>
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+            android:id="@+id/but_two"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:text="路线二"
+            android:textSize="15sp"
+            android:visibility="gone"
+            tools:visibility="visible"
+            android:textColor="@color/white"
+            app:qmui_backgroundColor="#F3AE3D"
+            app:qmui_borderColor="#F3AE3D"
+            android:layout_marginLeft="@dimen/dp_10"
+            app:qmui_radius="20dp"
+            android:gravity="center"
+            android:layout_height="45dp"/>
+
+        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+            android:id="@+id/but_three"
+            android:layout_width="0dp"
+            android:visibility="gone"
+            tools:visibility="visible"
+            android:layout_weight="1"
+            android:text="路线三"
+            android:textSize="15sp"
+            android:textColor="@color/white"
+            app:qmui_backgroundColor="#F3AE3D"
+            app:qmui_borderColor="#F3AE3D"
+            android:layout_marginLeft="@dimen/dp_10"
+            app:qmui_radius="20dp"
+            android:gravity="center"
+            android:layout_height="45dp"/>
+
+
+
+    </LinearLayout>
 
 
 </LinearLayout>

+ 122 - 0
gaode/src/main/res/layout/map_route.xml

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:id="@+id/img_back"
+            android:layout_width="20dp"
+            android:layout_height="20dp"
+            android:layout_marginStart="15dp"
+            android:src="@drawable/ic_back_black" />
+
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="35dp"
+            android:gravity="center"
+            android:text="轨迹信息"
+            android:textColor="#26292F"
+            android:textSize="20sp" />
+
+
+    </LinearLayout>
+
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#E3E4E5" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="25dp"
+        android:orientation="horizontal"
+        android:paddingStart="19dp"
+        android:paddingEnd="18dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="发货位置"
+            android:textColor="#636465"
+            android:textSize="15sp" />
+
+        <TextView
+            android:id="@+id/tv_start"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="10dp"
+            android:layout_weight="1"
+            android:gravity="right"
+            android:textColor="#26292F"
+            android:textSize="15sp"
+            tools:text="山东省 临沂市 河东区" />
+
+        <ImageView
+            android:layout_width="17dp"
+            android:layout_height="22dp"
+            android:layout_marginStart="7dp"
+            android:src="@drawable/amap_out" />
+
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="19dp"
+        android:layout_marginBottom="26dp"
+        android:orientation="horizontal"
+        android:paddingStart="19dp"
+        android:paddingEnd="18dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="卸货位置"
+            android:textColor="#636465"
+            android:textSize="15sp" />
+
+        <TextView
+            android:id="@+id/tv_end"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="10dp"
+            android:layout_weight="1"
+            android:gravity="right"
+            android:textColor="#26292F"
+            android:textSize="15sp"
+            tools:text="山东省 临沂市 河东区" />
+
+        <ImageView
+            android:layout_width="17dp"
+            android:layout_height="22dp"
+            android:layout_marginStart="7dp"
+            android:src="@drawable/amap_enter" />
+
+
+    </LinearLayout>
+
+
+
+        <com.amap.api.maps.MapView
+            android:id="@+id/map"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+
+
+
+
+</LinearLayout>