我现在已经为这个问题挣扎了几个小时:
我试图让我的itemizedoverlay正常工作,但我一直收到这个错误:
The method boundCenterBottom(Drawable) is undefined for the type 我的班级:
public MyDynamicItemizedOverlay(Drawable defaultMarker) {
super(boundCenterBottom(defaultMarker));
items = new ArrayList<OverlayItem>();
populate();
}
public void addNewItem(GeoPoint location, String markerText,
String snippet) {
items.add(new OverlayItem(snippet, markerText, location));
populate();
}
public void removeItem(int index) {
items.remove(index);
populate();
}
@Override
protected OverlayItem createItem(int index) {
return items.get(index);
}
@Override
public int size() {
return items.size();
}
@Override
public boolean onSnapToItem(int arg0, int arg1, Point arg2,
IMapView arg3) {
// TODO Auto-generated method stub
return false;
}
}我用的是osmdroid-android-3.0.8和3.0.7 (都试过了)。ItemizedOverlay实际上似乎没有这样的构造器,但我在谷歌上搜索到的所有示例都遵循相同的模式……
发布于 2012-05-11 15:16:16
好吧,看起来我的问题的答案是这个方法不是在osmdroid中实现的,并且:
item.setMarkerHotspot(HotspotPlace.BOTTOM_CENTER);应改为使用
https://stackoverflow.com/questions/9667208
复制相似问题