2011-09-15 34 views
0

我正在使用下面的代碼來顯示當前位置的標記...但是當我改變設備標記的方向消失..?谷歌地圖的標記(覆蓋)消失,同時改變設備的方向

  List<Overlay> mapOverlays = mapView.getOverlays(); 
      Drawable drawable = Activity.this.getResources().getDrawable(R.drawable.icon); 
      MyItemizedOverlay itemizedOverlay = new MyItemizedOverlay(drawable ,Activity.this); 

      GeoPoint point = new GeoPoint((int)(location.getLatitude()*1000000), 
        (int)(location.getLongitude()*1000000)); 

     OverlayItem overlayitem = new OverlayItem(point, "Current Location :","+acTextView.getText()); 

      itemizedOverlay.addOverlay(overlayitem); 
      mapOverlays.add(itemizedOverlay); 
      MapController mapController = mapView.getController(); 

      mapController.animateTo(point); 
      mapController.setZoom(14); 

如何處理mapview中的方向..?

回答

0

其實,當設備的方向改變restart..I把下面的屬性在我的manifest.xml的活動,我的問題是現在解決:

android:configChanges="orientation"