Android Open Source - openmbta-android Kaja Itemized Overlay

From Project

Back to project page openmbta-android.


The source code is released under:

Copyright (c) 2014 Kaja Software Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...

If you think the Android project openmbta-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kaja.openmbta;
/* www .  java2 s. c  o m*/
import java.util.ArrayList;

import android.content.Context;
import android.widget.Toast;


import com.readystatesoftware.mapviewballoons.BalloonItemizedOverlay;

public class KajaItemizedOverlay extends BalloonItemizedOverlay<OverlayItem> {

  private ArrayList<OverlayItem> m_overlays = new ArrayList<OverlayItem>();
  private Context c;
  public KajaItemizedOverlay(Drawable defaultMarker, MapView mapView) {
    super(boundCenter(defaultMarker), mapView);
    c = mapView.getContext();
  public void addOverlay(OverlayItem overlay) {

  protected OverlayItem createItem(int i) {
    return m_overlays.get(i);

  public int size() {
    return m_overlays.size();

  protected boolean onBalloonTap(int index, OverlayItem item) {
    //Toast.makeText(c, "onBalloonTap for overlay index " + index,Toast.LENGTH_LONG).show();
    return true;

Java Source Code List