OSMDroid: onTap example <p>I've started to study Android few weeks ago and now I need your help. My task is create off-line map (using OSMDroid and Mobile Atlas Creator), with two markers on it, path between them and some activity after clicking on this markers. I've done map, markers and path. Here is the code (Android 2.3.3):</p> <p>public class MainActivity extends Activity {</p> <pre><code>private MapView mapView; LocationManager locationManager; ArrayList&lt;OverlayItem&gt; overlayItemArray; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mapView = new MapView(this, 256); mapView.setClickable(true); mapView.setBuiltInZoomControls(true); mapView.getController().setZoom(15); mapView.getController().setCenter(new GeoPoint(54.332, 48.389)); mapView.setUseDataConnection(false); overlayItemArray = new ArrayList&lt;OverlayItem&gt;(); OverlayItem olItem = new OverlayItem("Here", "SampleDescription", new GeoPoint(54.332, 48.389)); overlayItemArray.add(olItem); overlayItemArray.add(new OverlayItem("Hi", "You're here", new GeoPoint(54.327, 48.389))); PathOverlay myPath = new PathOverlay(Color.RED, this); myPath.addPoint(new GeoPoint(54.327, 48.389)); myPath.addPoint(new GeoPoint(54.332, 48.389)); mapView.getOverlays().add(myPath); DefaultResourceProxyImpl defaultResourceProxyImpl = new DefaultResourceProxyImpl(this); ItemizedIconOverlay&lt;OverlayItem&gt; myItemizedIconOverlay = new ItemizedIconOverlay&lt;OverlayItem&gt;(overlayItemArray, null, defaultResourceProxyImpl); mapView.getOverlays().add(myItemizedIconOverlay); setContentView(mapView); //displaying the MapView } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } </code></pre> <p>} Question: how to realize onClick-method for this markers? And additional question for profy: how to do it right (I mean how to divide this program by classes)? Thanks a lot! =)</p>