类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(“你好,世界!”);
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;
}
}
答案 0 :(得分:0)
也许你应该检查一下:https://github.com/jgilfelt/android-mapviewballoons
它非常好用且易于使用,比滚动自己快得多。如果你想学习,你可以随时学习来源。