Aiden Fry
Aiden Fry

Reputation: 1682

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.

Upvotes: 0

Views: 763

Answers (1)

hanoo
hanoo

Reputation: 4245

Can't you just use location to know the user's position ?

Upvotes: -1

Related Questions