Tapped on the map.
class MapOverlay extends Overlay {
@Override
public boolean onTap(final GeoPoint p, MapView mapView) {
// TODO Auto-generated method stub
geop_Tpoint = p;
mcon_mapcontrol = mapView.getController();
mcon_mapcontrol.animateTo(p);
mv_mapview.invalidate();
longitude = (int)(p.getLongitudeE6()*1E6);
latitude = (int)(p.getLatitudeE6()*1E6);
new AlertDialog.Builder(ShowMap.this)
.setTitle("Routes")
.setMessage("Display Routes?")
.setNegativeButton("NO",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
textlocation.setText("Tap in the Map for Destination!");
dialog.dismiss();
}
})
.setPositiveButton("YES",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
try{
textlocation.setText("");
parsing(geop_startpoint,geop_Tpoint);
geocodeExecuter(geop_startpoint,geop_Tpoint);
showButton.setEnabled(true);
}catch(Exception e){
textlocation.setText(""+ e.getMessage());
}
}
}).show();
showButton.setEnabled(true);
return true;
}
The starting point is through GPS it will give me where im I.