display satelite map #24
@ -100,6 +100,17 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
||||
}
|
||||
});
|
||||
|
||||
ImageView mapType = findViewById(R.id.changeMapTypeHeader);
|
||||
mapType.setOnClickListener(view -> {
|
||||
if (googleMap.getMapType() != GoogleMap.MAP_TYPE_SATELLITE) {
|
||||
mapType.setImageResource(R.drawable.map);
|
||||
googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
|
||||
} else {
|
||||
mapType.setImageResource(R.drawable.satellite);
|
||||
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
|
||||
}
|
||||
});
|
||||
|
||||
setDate();
|
||||
}
|
||||
|
||||
|
@ -145,11 +145,11 @@ public class LiveActivity extends AbstractLiveActivity implements OnMapReadyCall
|
||||
// image View for changing map type satellite or map
|
||||
ImageView changeMapTypeImageView = findViewById(R.id.changeMapType);
|
||||
changeMapTypeImageView.setOnClickListener(v -> {
|
||||
if (googleMap.getMapType() == GoogleMap.MAP_TYPE_SATELLITE) {
|
||||
changeMapTypeImageView.setImageResource(R.drawable.satellite);
|
||||
if (googleMap.getMapType() != GoogleMap.MAP_TYPE_SATELLITE) {
|
||||
changeMapTypeImageView.setImageResource(R.drawable.map);
|
||||
googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
|
||||
} else {
|
||||
changeMapTypeImageView.setImageResource(R.drawable.map);
|
||||
changeMapTypeImageView.setImageResource(R.drawable.satellite);
|
||||
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user