简体   繁体   中英

Get reference to Android My Location Overlay Blue dot animation

Ok, So I am overwriting MyLocationOverlay in the hopes of removing the blue accuracy ring.

I am overwriting 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
            );


        }

However, I am finding it impossible to get a reference to the original blue dot animation that is used. How can I go about adding this back in? One single frame of the animation would be acceptable. Thanks.

您不能仅使用位置来知道用户的位置吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM