[3.3.0] bus乘客屏小地图UI调整

This commit is contained in:
wangmingjun
2023-06-26 11:06:55 +08:00
parent 0dcc830f2d
commit 90f9c7f61b
8 changed files with 20 additions and 15 deletions

View File

@@ -56,8 +56,6 @@ public class BusPassengerMapDirectionView
private List<LatLng> mCoordinatesLatLng = new ArrayList<>(); //轨迹坐标数据
private List<LatLng> mLineStationLatLng = new ArrayList<>();//站点坐标数据
private Polyline mPolyline;
private CameraUpdate mCameraUpdate;
private Context mContext;
List<BitmapDescriptor> textureList = new ArrayList<>();
List<Integer> texIndexList = new ArrayList<>();
@@ -65,7 +63,6 @@ public class BusPassengerMapDirectionView
private List<Marker> 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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B