title: Map overlay for osmdroid never appears
body: <p>I am trying to implement my own map overlay for osmdroid (but I assume it is fairly similar to Google map overlays).</p>
  
  <p>What I am trying to do is draw a plane, rotate it according to bearing and draw a speed vector (line ahead of the plane in the flight direction that shows where it will soon be).</p>
  
  <p>The idea is that I draw the plane (et all) on a canvas "facing North", then rotate it according to flight direction and "merge" it with the overlay canvas (I tried drawing directly to the overlay canvas, but on rotate, it was rotating the map as well). </p>
  
  <p>I have created a subclass of Overlay and overiden the onDraw method as follows:</p>
  
  <pre><code>@Override
  protected void draw(Canvas c, MapView mapView, boolean shadow) {
      if (location != null) {
          Point locPoint = new Point();
          GeoPoint locGeoPoint = new GeoPoint(location);
          final Projection pj = mapView.getProjection();
          pj.toMapPixels(locGeoPoint, locPoint);
  
          this.drawPlane(c, locPoint, location.getBearing());
      }
  }
  
  private void drawPlane(Canvas cs, Point ctr, float bearing) {
  
      Paint paint = new Paint();
      paint.setColor(Color.RED);
      paint.setAntiAlias(true);
  
      Bitmap planeBM = Bitmap.createBitmap(cs.getWidth(), cs.getHeight(), Bitmap.Config.ARGB_8888);
      planeBM.setDensity(cs.getDensity());        
      Canvas c = new Canvas(planeBM);
  
      Rect r = new Rect();
  
      //Point center = new Point(cs.getWidth() / 2, cs.getHeight() /2);
      Point center = new Point(0, 0);
  
      // Draw fuselage
      r.left = center.x - PLANE_WIDTH / 2;
      r.right = r.left + PLANE_WIDTH;
      r.top = center.y - PLANE_SIZE / 3;
      r.bottom = r.top + PLANE_SIZE;
  
      c.drawRect(r, paint);
  
      // Draw wing (REMOVED)
  
      // Draw stabilizer    (REMOVED)
  
      // TODO Draw Speed vector
  
  
      // "Merging" canvas
  
      Matrix merge = new Matrix(cs.getMatrix());
      //merge.setTranslate(0, 0);
      //merge.setRotate(bearing, center.x, center.y);
      cs.drawBitmap(planeBM, merge, paint);
      cs.save();
  
  }
  </code></pre>
  
  <p>Basically my plane never shows.</p>
  
  <p>I assume this has to do with the matrix in the initial canvas which has large values (I assume these are sort of geographical coordinates).</p>
  
  <p>It all seems to be consistent though (the plane location has large values as well consistent with the matrix).</p>
  
  <p>I have tried a number of things :</p>
  
  <ul>
  <li>drawing from the actual plane location (large values) : did not help;</li>
  <li>setting the matrix of my new canvas with the overlay canvas matrix : did not help;</li>
  <li>merging with a new "empty" matrix : did not help;
  -...</li>
  </ul>
  
  <p>I know that my image contains the plane (at least if I draw from 0,0 or the new canvas center as I saved it to the SD to check...</p>