获取Android My Location Overlay蓝点动画的参考

时间:2012-10-10 14:06:21

标签: android google-maps customization mylocationoverlay

好的,所以我要覆盖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
            );


        }

但是,我发现无法获得对所使用的原始蓝点动画的引用。我该如何重新加入?动画的一个单帧是可以接受的。 感谢。

1 个答案:

答案 0 :(得分:-1)

您是否只能使用location来了解用户的位置?