2010-08-24 6 views

답변

0

위치를 표시하는 마커 (파란색 점, 맥동 점) 만 교체 할 수 있습니다 (a related StackOverflow question 참조). 문제가 다소 오래 되더라도 도움이되기를 바랍니다.

1

서브 클래스 MyLocationOverlay, (베어링 떠, 캔버스 캔버스) 방법 drawCompass을 무시하고 캔버스 객체에 자신의 비트 맵 (들)을 그릴 :

@Override 
protected void drawCompass(Canvas canvas, float bearing) { 

    Resources res = _context.getResources(); 
    Bitmap myCompassPointer = BitmapFactory.decodeResource(res, R.drawable.compass_pointer); 

    float rotationAngle = -bearing + 360f; 
    Matrix rotation = new Matrix(); 
    rotation.preRotate(rotationAngle, myCompassPointer.getWidth()/2.0f, myCompassPointer.getHeight()/2.0f); 

    canvas.drawBitmap(myCompassPointer, rotation, null); 

    // don't call super if you don't want the default compass image: 
    //super.drawCompass(canvas, bearing); 

} 
관련 문제