是否可以在OverLayItem中发送除标记、标题和代码段以外的值。因为当地图中的气球被点击时,我想处理许多按钮,所以我需要额外的值,如ID,状态等。
发布于 2012-12-24 20:37:31
请尝试创建覆盖项的新类
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;
}
}发布于 2012-04-28 00:19:14
当然,你可以传递,OverlayItem就像任何其他类一样,改变它的构造函数,并为它传递你在类中需要的值。
https://stackoverflow.com/questions/10003491
复制相似问题