I can get the current zoom level with :
- Code: Select all
myZoomLevel = mapView.getZoomLevel
and I can change the icons with :
- Code: Select all
if (myZoomLevel >=5) {
this.defaultMarker = getResources().getDrawable(R.drawable.stageiconlarge);
this.defaultMarker.setBounds(0, 0, this.defaultMarker.getIntrinsicWidth(), this.defaultMarker
.getIntrinsicHeight());
}else{
this.defaultMarker = getResources().getDrawable(R.drawable.stageiconsmall);
this.defaultMarker.setBounds(0, 0, this.defaultMarker.getIntrinsicWidth(), this.defaultMarker
.getIntrinsicHeight());
};
But I need to set up a listener to detect when the user clicks on the zoom controls so the icons will change on zoom in or zoom out. I know it contains ZoomButtonsController.OnZoomListener but i'm not sure how to implement this type of listener (i'm a noob). It seems to be different from normal button onclicklisterners.
Can anyone help? or provide a quick example?
Thanks in advance!

