我现在正在为这个问题苦苦挣扎几个小时:
我试图让我的 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 实际上似乎没有这样的构造函数,但我能够通过谷歌搜索到的所有示例都遵循相同的模式......
好吧,看来我的问题的答案是这个方法没有在 osmdroid 中实现,并且:
item.setMarkerHotspot(HotspotPlace.BOTTOM_CENTER);
应该使用
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)