remove marker icon
This commit is contained in:
parent
c85dc279dc
commit
0b887deb99
@ -20,6 +20,8 @@ import com.google.android.gms.maps.CameraUpdateFactory;
|
|||||||
import com.google.android.gms.maps.GoogleMap;
|
import com.google.android.gms.maps.GoogleMap;
|
||||||
import com.google.android.gms.maps.OnMapReadyCallback;
|
import com.google.android.gms.maps.OnMapReadyCallback;
|
||||||
import com.google.android.gms.maps.SupportMapFragment;
|
import com.google.android.gms.maps.SupportMapFragment;
|
||||||
|
import com.google.android.gms.maps.model.BitmapDescriptor;
|
||||||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||||
import com.google.android.gms.maps.model.LatLng;
|
import com.google.android.gms.maps.model.LatLng;
|
||||||
import com.google.android.gms.maps.model.MarkerOptions;
|
import com.google.android.gms.maps.model.MarkerOptions;
|
||||||
import com.google.android.gms.maps.model.PolylineOptions;
|
import com.google.android.gms.maps.model.PolylineOptions;
|
||||||
@ -103,15 +105,17 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
|||||||
private void displayHistory(ArrayList<HistPos> positions) {
|
private void displayHistory(ArrayList<HistPos> positions) {
|
||||||
LatLng latLng = null;
|
LatLng latLng = null;
|
||||||
PolylineOptions polylineOptions = new PolylineOptions();
|
PolylineOptions polylineOptions = new PolylineOptions();
|
||||||
|
// BitmapDescriptor markerIcon = BitmapDescriptorFactory.fromResource(R.drawable.arrow_right);
|
||||||
for (int i = 0; i < positions.size(); i++) {
|
for (int i = 0; i < positions.size(); i++) {
|
||||||
HistPos pos = positions.get(i);
|
HistPos pos = positions.get(i);
|
||||||
if (pos.speed > 0) {
|
if (pos.speed > 0) {
|
||||||
latLng = new LatLng(pos.lat, pos.lng);
|
latLng = new LatLng(pos.lat, pos.lng);
|
||||||
polylineOptions.add(latLng);
|
polylineOptions.add(latLng);
|
||||||
|
|
||||||
googleMap.addMarker(new MarkerOptions()
|
// googleMap.addMarker(new MarkerOptions()
|
||||||
.position(latLng)
|
// .position(latLng)
|
||||||
.title(String.valueOf(i)));
|
// .icon(markerIcon)
|
||||||
|
// .title(String.valueOf(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user