Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Bagi yang mengembangkan google map pada android. Berikut ini cara menampilkan zoom control pada google map di android.

pada file main.xml (misal) :

< ?xml version="1.0" encoding="utf-8"?>





Lalu pada file classnya :

zoomControls.setOnZoomInClickListener(new View.OnClickListener() {

public void onClick(View v) {
mc.zoomIn();
}
});
zoomControls.setOnZoomOutClickListener(new View.OnClickListener() {

public void onClick(View v) {
mc.zoomOut();
}
});

zoomControls.setOnZoomInClickListener(new View.OnClickListener() {

public void onClick(View v) {
mapcontroller.zoomIn();
}
});
zoomControls.setOnZoomOutClickListener(new View.OnClickListener() {

public void onClick(View v) {
mapcontroller.zoomOut();
}
});

Tagged : #

Leave a Reply

Your email address will not be published. Required fields are marked *