Back to project page advanced-tourist-map.
The source code is released under:
GNU General Public License
If you think the Android project advanced-tourist-map 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 org.muxe.advancedtouristmap.overlay; /*from ww w.j a v a2 s . c om*/ import org.mapsforge.android.maps.ArrayItemizedOverlay; import org.mapsforge.android.maps.OverlayItem; import android.content.Context; import android.graphics.drawable.Drawable; public class GenericOverlay extends ArrayItemizedOverlay { private final Context context; public GenericOverlay(Context context, Drawable defaultMarker) { super(defaultMarker); this.context = context; } public GenericOverlay(Context context, Drawable defaultMarker, boolean alignMarker) { super(defaultMarker, alignMarker); this.context = context; } @Override protected boolean onTap(int index) { OverlayItem item = createItem(index); if (item != null) { ((GenericOverlayItem) item).onTap(this.context); } return true; } }