title: Showing overlay in wrong geo point using Open Street Map
body: <p>I am using the osmdroid-android 3.0.5.jar instead of Google map api to show the location in map by using geo-coordinate.</p>
  
  <p>Well i am able to get map in android emulator but the problem is the overlay i am using to point to location is wrong. </p>
  
  <p>Here's my code :</p>
  
  <pre><code>public class MainActivity extends Activity {
  /** Called when the activity is first created. */
  private MapView osmMapView;
  private MapController controller;
  private Projection projection;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      osmMapView = (MapView) findViewById(R.id.osm_map_view);
  
      this.osmMapView.setTileSource(TileSourceFactory.MAPNIK);
      this.osmMapView.setBuiltInZoomControls(true);
      this.osmMapView.setMultiTouchControls(true);
  
      this.projection = this.osmMapView.getProjection();
  
      this.controller = this.osmMapView.getController();
      this.controller.setZoom(5);
  
      List&lt;Overlay&gt; overLayList = osmMapView.getOverlays();
      overLayList.add(new ScaleBarOverlay(this));
      overLayList.add(new PutOverLayOnMap(this));
  }
  
  private class PutOverLayOnMap extends Overlay {
      public PutOverLayOnMap(Context ctx) {
          super(ctx);
      }
  
      @Override
      protected void draw(Canvas c, MapView osmv, boolean shadow) {
          Paint paint = new Paint();
          paint.setColor(Color.RED);
          paint.setDither(true);
          paint.setStyle(Paint.Style.FILL_AND_STROKE);
          paint.setStrokeJoin(Paint.Join.ROUND);
          paint.setStrokeCap(Paint.Cap.ROUND);
          paint.setStrokeWidth(10);
          Point point = new Point();
          GeoPoint geoPoint = new GeoPoint((int)(41.057121 * 1E6), (int)(-73.561867 * 1E6));
          projection.toPixels(geoPoint, point);
          c.drawPoint(point.x, point.y, paint);
          System.out.println("GeoPoint(OSM) : "+geoPoint.getLatitudeE6()+" #### "+geoPoint.getLongitudeE6());
  
      }
  }
  </code></pre>
  
  <p>The following is my main.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  &gt;
  &lt;org.osmdroid.views.MapView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_centerInParent="true"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:clickable="true"
      android:id="@+id/osm_map_view"
      renderer="CloudMadeStandardTiles"
      cloudmadeStyle="1"
  /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>As you can see I am using </p>
  
  <pre><code>GeoPoint geoPoint = new GeoPoint((int)(41.057121 * 1E6), (int)(-73.561867 * 1E6));
  </code></pre>
  
  <p>which is the geo-coordinate of <strong>Stamford US</strong> Now the red dot is showing somewhere Africa, center of the map (intersection of latitude &amp; longitude).</p>
  
  <p>What i am doing wrong?</p>