title: android draw pin on google map
body: <p>I have created googlemap in my android application. Now i want to draw pin at my location.</p>
  
  <p>This is my code for that:-</p>
  
  <pre><code>public class GooglemapActivity extends MapActivity {
  private List&lt;Overlay&gt; mapOverlays;
  private Drawable drawable;
  private MyOverlay itemizedOverlay;
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      MapView mMapView;
      mMapView = (MapView) findViewById(R.id.mapview);
      mMapView.setBuiltInZoomControls(true);
      mapOverlays = mMapView.getOverlays();
      drawable = getResources().getDrawable(R.drawable.c_map_pin_blue);
      itemizedOverlay = new MyOverlay(drawable);
      GeoPoint point = new GeoPoint((int) 26.863966000000000,
              (int) 75.766938300000000);
  
      itemizedOverlay.addItem(point, "Quippelin", "0");
      mapOverlays.add(itemizedOverlay);
  
  }
  
  @Override
  protected boolean isRouteDisplayed() {
      // TODO Auto-generated method stub
      return false;
  }
  }
  </code></pre>
  
  <p>and this is my another class:-</p>
  
  <pre><code>public class MyOverlay extends ItemizedOverlay&lt;OverlayItem&gt; {
  private ArrayList&lt;OverlayItem&gt; overlayItemList = new ArrayList&lt;OverlayItem&gt;();
  
  public MyOverlay(Drawable marker) {
      super(boundCenterBottom(marker));
      // TODO Auto-generated constructor stub
  
      populate();
  }
  
  public void addItem(GeoPoint p, String title, String snippet) {
      OverlayItem newItem = new OverlayItem(p, title, snippet);
      overlayItemList.add(newItem);
      populate();
  }
  
  @Override
  protected OverlayItem createItem(int i) {
      // TODO Auto-generated method stub
      return overlayItemList.get(i);
  }
  
  @Override
  public int size() {
      // TODO Auto-generated method stub
      return overlayItemList.size();
  }
  
  @Override
  public void draw(Canvas canvas, MapView mapView, boolean shadow) {
      // TODO Auto-generated method stub
      super.draw(canvas, mapView, shadow);
      // boundCenterBottom(marker);
  }
  }
  </code></pre>
  
  <p>my map is displaying correctly but my pin is not displaying, please help me to findout the mistake which i have done.</p>
  
  <p>Thank you in advance.</p>