マップビューの作成時にコンパスを画面に表示するにはどうすればよいですか? このコードの何が問題になっていますか? 助言がありますか?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mc = mapView.getController();
myLoc = new MyLocationOverlay(this, mapView);
myLoc.enableCompass();
mapView.getOverlays().add(myLoc);
mapView.postInvalidate();
locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);