2012-04-04 132 views
0

是否可以在OverLayItem中發送除標記,標題和片段之外的值。 因爲我想處理很多按鈕,當點擊地圖中的氣球時,所以我需要額外的值,如ID,狀態等。ANDROID OverlayItem - 傳遞值

回答

0

請嘗試創建新類的overlayitem

import com.google.android.maps.OverlayItem; 

import com.google.android.maps.GeoPoint; 

public class MyOverlayItem extends OverlayItem{ 

    public String newvalue; 

     public MyOverlayItem (GeoPoint point,String arg1,String arg2,String newvalue) 
     { 
      super(point, arg1, arg2); 
      this.newvalue=newvalue; 
     } 
} 
0

是的,你可以通過,當然,OverlayItem就像任何其他類,改變它的構造函數和傳遞你在課堂上需要的價值。