class MapOverlay extends Overlay
      {
        private GeoPoint pointToDraw;

        public void setPointToDraw(GeoPoint point) {
          pointToDraw = point;
        }

        public GeoPoint getPointToDraw() {
          return pointToDraw;
        }

        @Override
        public boolean draw(Canvas canvas, MapView mapView, boolean shadow,
long when) {
          super.draw(canvas, mapView, shadow);

          // convert point to pixels
          Point screenPts = new Point();
          mapView.getProjection().toPixels(pointToDraw, screenPts);

          // add marker
          Bitmap bmp = BitmapFactory.decodeResource(getResources(),
R.drawable.marker);
          canvas.drawBitmap(bmp, screenPts.x, screenPts.y - 24, null);
        Paint paint= new Paint;
         paint.setARGB(250,255,0,0);
          paint.setAntiAlias(true);
          paint.setFakeBoldText(true);
          Paint backpaint = new Paint();
          backPaint.setARGB(175,50,50,50);

         canvas.drawText("Here I Am", screenPts.x, screenPts.y, paint);
          return true;
        }



    }}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to