开发者

Android Map Issue?

To show an specific location in android Map, I am using overlay class, and paint object which have reference of Geo point, drawing an balloon bitmap image.

But when I zoom (in/out) map, my balloon does not adjust according to the changed view of the map.

I'm using the following overlay pattern:

class MapOverlay extends com.google.android.maps.Overlay
{

    @Override
    public void draw(Canvas canvas, MapView mapView, boolean shadow) {

        Point point = null, point1 = null; 

        if(p!=null)
        {
            point = new Point();                
            mapView.getProjection().toPixels(p, point);
                             开发者_StackOverflowBitmap bmp = BitmapFactory.decodeResource(
                    getResources(), R.drawable.redbaloon);            
            canvas.drawBitmap(bmp, point.x-38, point.y+60, null);
                      }}

How can I draw balloon with zooming?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜