Back to project page footprint.
The source code is released under:
MIT License
If you think the Android project footprint 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 com.sabaware.footprint; //w w w. j a v a 2 s . c o m 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; public class MyItemizedOverlay extends ItemizedOverlay<OverlayItem> { private ArrayList<OverlayItem> overlayItemList = new ArrayList<OverlayItem>(); public MyItemizedOverlay(Drawable pDefaultMarker, ResourceProxy pResourceProxy) { super(pDefaultMarker, pResourceProxy); } 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(); } }