I used the Overlay class for this purpose.
Here is the main part of the MyOverlay::Draw() method:
        // convert bitmap's bounding box into pixels
        Point top_left = new Point();
        mapView.getProjection().toPixels(min, top_left);
        Point bottom_right = new Point();
        mapView.getProjection().toPixels(max, bottom_right);

        // Prepare two rectangles (pixels)
        Rect src = new Rect( 0,0,bmp.getWidth() - 1, bmp.getHeight() - 1 );
        Rect dst = new Rect( top_left.x, bottom_right.y,
bottom_right.x,top_left.y );

        // draw bitmap
        canvas.drawBitmap( bmp, src, dst, null);

Since it uses current mapView then zooming and panning are supported
automatically.

Obviously you need to now left top (GeoPoint min in the code above)
and right bottom (GeoPoint max) coordinates for your picture (I used
Google Earth for this purpose).

Good luck.
Igor

On Nov 17, 7:52 am, Allan Valeriano <[email protected]> wrote:
> Hi all,
>
> does anybody knows if it is possible to zoom in and out on a custom
> overlay and enlarge the image?
> I'd like to do something like that:http://geoserver.nima.puc-rio.br/puc-rio/
>
> If you zoom in, you'll notice that the image gets bigger.

-- 
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