diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java index bffa069b93..bd65bb8332 100644 --- a/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java +++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java @@ -56,8 +56,6 @@ public class BusPassengerMapDirectionView private List mCoordinatesLatLng = new ArrayList<>(); //轨迹坐标数据 private List mLineStationLatLng = new ArrayList<>();//站点坐标数据 private Polyline mPolyline; - private CameraUpdate mCameraUpdate; - private Context mContext; List textureList = new ArrayList<>(); List texIndexList = new ArrayList<>(); @@ -65,7 +63,6 @@ public class BusPassengerMapDirectionView private List mLineMarkers = new ArrayList<>(); -// private IBusPassengerMapViewCallback mIBusPassengerMapViewCallback; private BitmapDescriptor mArrivedRes; private BitmapDescriptor mUnArrivedRes; @@ -86,14 +83,9 @@ public class BusPassengerMapDirectionView } } -// public void setTaxiPassengerMapViewCallback(IBusPassengerMapViewCallback iBusPassengerMapViewCallback) { -// this.mIBusPassengerMapViewCallback = iBusPassengerMapViewCallback; -// } - private void initView(Context context) { CallerLogger.INSTANCE.d(M_BUS_P + TAG, "initView"); - mContext = context; View smpView = LayoutInflater.from(context).inflate(R.layout.bus_p_map_view, this); @@ -323,17 +315,30 @@ public class BusPassengerMapDirectionView mLineStationLatLng.addAll(mLineStationsList); if (mLineStationsList.size() > 0){ + // 起点marker, 终点marker, 过站marker, 未过站marker + + int size = mLineStationsList.size(); + + Marker mStartMarker = mAMap.addMarker(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_start_point))); + Marker mEndMarker = mAMap.addMarker(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_end_point))); + mStartMarker.setPosition(mLineStationsList.get(0)); + mLineMarkers.add(0,mStartMarker); + mEndMarker.setPosition(mLineStationsList.get(size-1)); + mLineMarkers.add(size-1,mEndMarker); + for (int i = 0; i < mLineStationsList.size(); i++) { - if (currentIndex == i){ - Marker mEndMarker = mAMap.addMarker(new MarkerOptions() - .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point))); + if (currentIndex <= i && i < size-1){ //未到达 + Marker unArrivedMarker = mAMap.addMarker(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_unarrived_point))); mEndMarker.setPosition(mLineStationsList.get(i)); - mLineMarkers.add(i,mEndMarker); + mLineMarkers.add(i,unArrivedMarker); }else { - Marker mStartMarker = mAMap.addMarker(new MarkerOptions() - .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point))); + Marker arrivedMarker = mAMap.addMarker(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrived_point))); mStartMarker.setPosition(mLineStationsList.get(i)); - mLineMarkers.add(i,mStartMarker); + mLineMarkers.add(i,arrivedMarker); } } } diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_arrived_point.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_arrived_point.png new file mode 100644 index 0000000000..ac317649b4 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_arrived_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_car.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_car.png index 17beb894a6..702f10f265 100644 Binary files a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_car.png and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_car.png differ diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_end_point.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_end_point.png new file mode 100644 index 0000000000..39262e5ecb Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_end_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_start_point.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_start_point.png new file mode 100644 index 0000000000..b2e4c69ada Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_start_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_unarrived_point.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_unarrived_point.png new file mode 100644 index 0000000000..ec6081f5a3 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_unarrived_point.png differ diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_view_dir_end_point.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_view_dir_end_point.png deleted file mode 100644 index 1e64713481..0000000000 Binary files a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_view_dir_end_point.png and /dev/null differ diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_view_dir_way_point.png b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_view_dir_way_point.png deleted file mode 100644 index ff04c01f13..0000000000 Binary files a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/drawable-nodpi/bus_p_map_view_dir_way_point.png and /dev/null differ