We all know that some of the predefined landmarks on Google Maps does not appear on a lower zoom level, but on a higher zoom level, it suddenly appears. I would like to know If I can make a customized marker not appear at lower zoom levels, then appear at higher ones.
EDIT: Here is a snippet of my code.
// Changing marker icon
marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.gasbig));
// adding marker
map.addMarker(marker);
//position on Center
CameraPosition cameraPosition = new CameraPosition.Builder().target(
new LatLng(14.635356, 121.03272914)).zoom(16).build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
map.setOnCameraChangeListener(new OnCameraChangeListener() {
@Override
public void onCameraChange(CameraPosition arg0) {
if(arg0.zoom > 7){
marker.visible(true);
}
}
});
I tried the suggestion of MaciejGórski but the marker still appears on all zoom levels. I'm sorry about the question I'm still an android newbie.
Thanks in advance.