好的,所以我正在覆盖 MyLocationOverlay 以希望移除蓝色准确环。
我正在覆盖 drawMyLocation()
@Override
protected void drawMyLocation(Canvas canvas, MapView mapView, Location lastFix, GeoPoint myLocation, long when) {
// translate the GeoPoint to screen pixels
Point screenPts = mapView.getProjection().toPixels(myLocation, null);
// create a rotated copy of the marker
Bitmap arrowBitmap = BitmapFactory.decodeResource( mContext.getResources(), android.THISISWHERETHEANIMATIONSHOULDGO);
Matrix matrix = new Matrix();
matrix.postRotate(mOrientation);
Bitmap rotatedBmp = Bitmap.createBitmap(
arrowBitmap,
0, 0,
arrowBitmap.getWidth(),
arrowBitmap.getHeight(),
matrix,
true
);
// add the rotated marker to the canvas
canvas.drawBitmap(
rotatedBmp,
screenPts.x - (rotatedBmp.getWidth() / 2),
screenPts.y - (rotatedBmp.getHeight() / 2),
null
);
}
但是,我发现无法获得对所使用的原始蓝点动画的引用。我该如何重新添加这个?一帧动画是可以接受的。谢谢。