Android maps ItemizedOverlay<Item> Bound mismatch

564 Views Asked by At

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> 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?

1

There are 1 best solutions below

0
On

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