Listing 813 Skeleton code for a dynamic Itemized Overlay

Available for download on public class MyDynamicItemizedOverlay extends ItemizedOverlay<OverlayItem> {

private ArrayList<OverlayItem> items;

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(location, markerText, snippet)); populate();

public void removeItem(int index) { items.remove(index); populate();

@Override protected OverlayItem createItem(int index) { return items.get(index);


LISTING 8-13 (continued)

©Override public int size() { return items.size();

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide

Post a comment