PATRIK27 / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Enhancements for ItemizedOverlay / ItemizedIconOverlay #198

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
According to Issue 182 there are some new Methods in ItemizedIconOverlay for 
adding and removing items.

I have a small enhancement suggestion.

It would be very helpfull to add more than one item and to remove all items.

public boolean addItems(List<Item> items) {
    boolean result = mItemList.addAll(items);
    populate();
    return result;
}

public void removeAllItems() {
    removeAllItems(true);
}

public void removeAllItems(boolean withPopulate) {
    mItemList.clear();
    if (withPopulate)
    {
        populate();
    }
}

public void replaceAllItems(List<Item> items) {
    removeAllItems(false);
    boolean result = mItemList.addAll(items);
    populate();
}

Original issue reported on code.google.com by ti...@ametov.net on 7 Apr 2011 at 11:57

GoogleCodeExporter commented 8 years ago

Original comment by neilboyd on 18 Apr 2011 at 5:28

GoogleCodeExporter commented 8 years ago
Agreed! I am going to leave out replaceAllItems to keep the API cleaner since 
it is just a composite function.

Original comment by kurtzm...@gmail.com on 15 May 2011 at 11:37

GoogleCodeExporter commented 8 years ago
Fixed in r934.

Original comment by kurtzm...@gmail.com on 15 May 2011 at 11:42