Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 14th, 2013  |  syntax: None  |  size: 0.82 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. @Override
  2.     public void draw(Canvas canvas, MapView mapview, boolean shadow) {
  3.         // TODO Auto-generated method stub
  4.         super.draw(canvas, mapview, shadow);
  5.  
  6.         if(!shadow)
  7.         {
  8.         for (int ctr = 0; ctr < myOverlays.size(); ctr++)
  9.         {
  10.             GeoPoint in = myOverlays.get(ctr).getPoint();
  11.  
  12.             //Toast.makeText(mapview.getContext(), ctr, Toast.LENGTH_SHORT).show();
  13.  
  14.             Point out = new Point();
  15.             mapview.getProjection().toPixels(in, out);
  16.  
  17.             Bitmap bm = BitmapFactory.decodeResource(mapview.getResources(),
  18.               R.drawable.beer_full);
  19.  
  20.  
  21.             canvas.drawBitmap(bm,
  22.               out.x - bm.getWidth()/2,  //shift the bitmap center
  23.               out.y - bm.getHeight()/2,  //shift the bitmap center
  24.               null);
  25.         }
  26.         }
  27.     }