Merge pull request 'display satelite map' (#24) from SD-220 into develop
Reviewed-on: #24
This commit is contained in:
commit
33d00c27d7
@ -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();
|
setDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,11 +145,11 @@ public class LiveActivity extends AbstractLiveActivity implements OnMapReadyCall
|
|||||||
// image View for changing map type satellite or map
|
// image View for changing map type satellite or map
|
||||||
ImageView changeMapTypeImageView = findViewById(R.id.changeMapType);
|
ImageView changeMapTypeImageView = findViewById(R.id.changeMapType);
|
||||||
changeMapTypeImageView.setOnClickListener(v -> {
|
changeMapTypeImageView.setOnClickListener(v -> {
|
||||||
if (googleMap.getMapType() == GoogleMap.MAP_TYPE_SATELLITE) {
|
if (googleMap.getMapType() != GoogleMap.MAP_TYPE_SATELLITE) {
|
||||||
changeMapTypeImageView.setImageResource(R.drawable.satellite);
|
changeMapTypeImageView.setImageResource(R.drawable.map);
|
||||||
googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
|
googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
|
||||||
} else {
|
} else {
|
||||||
changeMapTypeImageView.setImageResource(R.drawable.map);
|
changeMapTypeImageView.setImageResource(R.drawable.satellite);
|
||||||
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
|
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user