开发者

Android maps ItemizedOverlay<Item> Bound mismatch

I am trying to walk through official tutorial for android google maps: http://developer.android.com/guide/tutorials/views/hello-mapview.html I am implementing the class which is extending ItemizedOverlay:

public class HelloItemizedOverlay<Item>开发者_JAVA百科; extends ItemizedOverlay<Item> {
public HelloItemizedOverlay(Drawable defaultMarker) {
    super(defaultMarker);
}
@Override
protected Item createItem(int i) {
    return null;
}
@Override
public int size() {
    return 0;
}
}

This class was completely generated by Eclipse. And I get the error:

Bound mismatch: The type Item is not a valid substitute for the bounded parameter of the type ItemizedOverlay

What am I doing wrong?


It looks like your custom class Item does not extend OverlayItem which is the basic component of any ItemizedOverlay.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜