osmbonuspack_v4.8 ilb
を使用してマーカーを表示しようとしています。 マーカーが表示されましたが、画面のleft-top
に配置されています。 をに設定しようとしていますが、できません。私はその理由を知らない。openstreetmap - 画面の中央にマーカーを設定するにはどうすればいいですか?
最善の方法を教えてください。
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setMultiTouchControls(true);
mapView.setTileSource(TileSourceFactory.MAPNIK);
mapController = (MapController) this.mapView.getController();
mapController.setZoom(15);
GeoPoint center = new GeoPoint(52.221, 6.893);
mapController.animateTo(center);
//mapController.setCenter(center);
//--- Create Overlay
addMarker(center);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
}
何ですか?画面中央の緯度/経度にアイコンを配置しようとしていますか?または、他の何か? – spy