new marker icon

This commit is contained in:
CiufudeanDani 2022-03-21 13:01:04 +02:00
parent 0b887deb99
commit bca16caf94
2 changed files with 5 additions and 5 deletions

View File

@ -105,17 +105,17 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
private void displayHistory(ArrayList<HistPos> positions) {
LatLng latLng = null;
PolylineOptions polylineOptions = new PolylineOptions();
// BitmapDescriptor markerIcon = BitmapDescriptorFactory.fromResource(R.drawable.arrow_right);
BitmapDescriptor markerIcon = BitmapDescriptorFactory.fromResource(R.drawable.history_pin);
for (int i = 0; i < positions.size(); i++) {
HistPos pos = positions.get(i);
if (pos.speed > 0) {
latLng = new LatLng(pos.lat, pos.lng);
polylineOptions.add(latLng);
// googleMap.addMarker(new MarkerOptions()
// .position(latLng)
// .icon(markerIcon)
// .title(String.valueOf(i)));
googleMap.addMarker(new MarkerOptions()
.position(latLng)
.icon(markerIcon)
.title(String.valueOf(i)));
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB