Back to project page local-stories.
The source code is released under:
Apache License
If you think the Android project local-stories listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package no.hiof.stud.localstories; // w w w. ja v a2s . c om import java.util.ArrayList; import org.osmdroid.ResourceProxy; import org.osmdroid.api.IMapView; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.overlay.ItemizedOverlay; import org.osmdroid.views.overlay.OverlayItem; import android.graphics.Point; import android.graphics.drawable.Drawable; import android.util.Log; public class MyItemizedOverlay extends ItemizedOverlay<OverlayItem> { private ArrayList<OverlayItem> overlayItemList = new ArrayList<OverlayItem>(); public MyItemizedOverlay(Drawable pDefaultMarker, ResourceProxy pResourceProxy) { super(pDefaultMarker, pResourceProxy); // TODO Auto-generated constructor stub } public boolean onTap(int index) { Log.i("LocalStories", "Tap-tap!"); return true; } public void addItem(GeoPoint p, String title, String snippet){ OverlayItem newItem = new OverlayItem(title, snippet, p); overlayItemList.add(newItem); populate(); } @Override public boolean onSnapToItem(int arg0, int arg1, Point arg2, IMapView arg3) { // TODO Auto-generated method stub return false; } @Override protected OverlayItem createItem(int arg0) { // TODO Auto-generated method stub return overlayItemList.get(arg0); } @Override public int size() { // TODO Auto-generated method stub return overlayItemList.size(); } }