关于Android map
private ArrayItemizedOverlay createPOIOverlay() {
return new ArrayItemizedOverlay(getResources().getDrawable(
R.drawable.map_pin_blue)) {
@Override
protected boolean onTap(int index) {
final PointOfInterest poi = selectedPOIs.get(index);
AlertDialog.Builder dialog = new AlertDialog.Builder(
MapDisplayActivity.this);
DialogInterface.OnClickListener showPhotos = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// TODO Project Phase Two : you need to insert code here that will
// display the three closest photographs to the current poi
// START ADDING CODE HERE
// STOP ADDING CODE HERE
dialog.cancel();
}
};
DialogInterface.OnClickListener cancel = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
};
dialog.setPositiveButton("Nearest Photos", showPhotos);
dialog.setNegativeButton("Cancel", cancel);
dialog.setTitle(poi.getDisplayName());
dialog.setMessage(poi.getDescription());
dialog.show();
return true;
}
};
method:
public void onClick(DialogInterface dialog, int id) {
}
怎么写啊?!!!