0

类 MapOverlay 扩展 com.google.android.maps.Overlay {

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

        Point screenPts = new Point();

// scree.openInfoWindowHtml("Hello, World! " );

        mapView.getProjection().toPixels(g, screenPts);

        Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.flag);            
        canvas.drawBitmap(bmp, screenPts.x, screenPts.y-50, null);  

        //TextView bubble=
        return true;
    }
}
4

1 回答 1

0

也许你应该检查一下:https ://github.com/jgilfelt/android-mapviewballoons

它非常好且易于使用,比自己滚动要快得多。如果您想学习,您可以随时研究源代码。

于 2012-12-09T04:33:30.943 回答