Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void draw(Canvas canvas, MapView mapview, boolean shadow) {
- // TODO Auto-generated method stub
- super.draw(canvas, mapview, shadow);
- if(!shadow)
- {
- for (int ctr = 0; ctr < myOverlays.size(); ctr++)
- {
- GeoPoint in = myOverlays.get(ctr).getPoint();
- //Toast.makeText(mapview.getContext(), ctr, Toast.LENGTH_SHORT).show();
- Point out = new Point();
- mapview.getProjection().toPixels(in, out);
- Bitmap bm = BitmapFactory.decodeResource(mapview.getResources(),
- R.drawable.beer_full);
- canvas.drawBitmap(bm,
- out.x - bm.getWidth()/2, //shift the bitmap center
- out.y - bm.getHeight()/2, //shift the bitmap center
- null);
- }
- }
- }
Add Comment
Please, Sign In to add comment