how to add own images in mapview balloon
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/13578388/how-to-add-an-image-in-mapview-balloon">How to add an image in mapview balloon?</a>  </p>
</blockquote>



<p>this is a code which show image from url how do i give image from my res/drawable folder? this is a <a href="https://github.com/jgilfelt/android-mapviewballoons" rel="nofollow">https://github.com/jgilfelt/android-mapviewballoons</a>  code i used please tell me how i give my own images istead of url</p>

<pre><code> public class CustomMap extends MapActivity {

MapView mapView;
List&lt;Overlay&gt; mapOverlays;
Drawable drawable;
Drawable drawable2;
CustomItemizedOverlay&lt;CustomOverlayItem&gt; itemizedOverlay;
CustomItemizedOverlay&lt;CustomOverlayItem&gt; itemizedOverlay2;

@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mapView = (MapView) findViewById(R.id.mapview);
    mapView.setBuiltInZoomControls(true);

    mapOverlays = mapView.getOverlays();

    // first overlay
    drawable = getResources().getDrawable(R.drawable.marker);
    itemizedOverlay = new CustomItemizedOverlay&lt;CustomOverlayItem&gt;(drawable,  
   mapView);

    GeoPoint point = new GeoPoint((int)(51.5174723*1E6),(int)(-0.0899537*1E6));
    CustomOverlayItem overlayItem = new CustomOverlayItem(point, "Tomorrow  
   Never Dies (1997)", 
            "(M gives Bond his mission in Daimler car)", 
            "http://ia.media-imdb.com/images 
 5BMTM1MTk2ODQxNV5BMl5BanBnXkFtZTcwOTY5MDg0NA@@._V1._SX40_CR0,0,40,54_.jpg");
    itemizedOverlay.addOverlay(overlayItem);

    GeoPoint point2 = new GeoPoint((int)(51.515259*1E6),(int)(-0.086623*1E6));
    CustomOverlayItem overlayItem2 = new CustomOverlayItem(point2,  
    "GoldenEye    (1995)", 
            "(Interiors Russian defence ministry council chambers in  
St Petersburg)", 
            "http://ia.media-imdb.com 


  images5BMzk2OTg4MTk1NF5BMl5BanBnXkFtZTcwNj
ExNTgzNA@@._V1._SX40_CR0,0,40,54_.jpg");        
    itemizedOverlay.addOverlay(overlayItem2);

    mapOverlays.add(itemizedOverlay);

    // second overlay
    drawable2 = getResources().getDrawable(R.drawable.marker2);
    itemizedOverlay2 = new CustomItemizedOverlay&lt;CustomOverlayItem&gt;
   (drawable2,    mapView);

    GeoPoint point3 = new GeoPoint((int)(51.513329*1E6),(int)(-0.08896*1E6));
    CustomOverlayItem overlayItem3 = new CustomOverlayItem(point3, "Sliding 
   Doors (1998)", 
            "(interiors)", null);
    itemizedOverlay2.addOverlay(overlayItem3);

    GeoPoint point4 = new GeoPoint((int)(51.51738*1E6),(int)(-0.08186*1E6));
    CustomOverlayItem overlayItem4 = new CustomOverlayItem(point4, "Mission:  
  Impossible (1996)", 
            "(Ethan &amp; Jim cafe meeting)", 
            "http://ia.media- 
      imdb.coimagesV5BMjAyNjk5Njk0MV5BMl5BanBnXkFtZTcwOT
 A4MjIyMQ@@._V1._SX40_CR0,0,40,54_.jpg");       
    itemizedOverlay2.addOverlay(overlayItem4);

    mapOverlays.add(itemizedOverlay2);

    final MapController mc = mapView.getController();
    mc.animateTo(point2);
    mc.setZoom(16);

  }

@Override
protected boolean isRouteDisplayed() {
    return false;
}

         }







                     public class CustomOverlayItem extends OverlayItem {

protected String mImageURL;

public CustomOverlayItem(GeoPoint point, String title, String snippet, String  
         imageURL) {
    super(point, title, snippet);
    mImageURL = imageURL;
}

public String getImageURL() {
    return mImageURL;
}

public void setImageURL(String imageURL) {
    this.mImageURL = imageURL;
}

             }




                    public class CustomBalloonOverlayView&lt;Item extends OverlayItem&gt; 
       extends BalloonOverlayView&lt;CustomOverlayItem&gt; {

private TextView title;
private TextView snippet;
private ImageView image;

public CustomBalloonOverlayView(Context context, int balloonBottomOffset) {
    super(context, balloonBottomOffset);
}

@Override
protected void setupView(Context context, final ViewGroup parent) {

    // inflate our custom layout into parent
    LayoutInflater inflater = (LayoutInflater) context
            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View v = inflater.inflate(R.layout.balloon_overlay_example2, parent);

    // setup our fields
    title = (TextView) v.findViewById(R.id.balloon_item_title);
    snippet = (TextView) v.findViewById(R.id.balloon_item_snippet);
    image = (ImageView) v.findViewById(R.id.balloon_item_image);

}

@Override
protected void setBalloonData(CustomOverlayItem item, ViewGroup parent) {

    // map our custom item data to fields
    title.setText(item.getTitle());
    snippet.setText(item.getSnippet());

    // get remote image from network.
    // bitmap results would normally be cached, but this is good enough for  
         demo purpose.
    image.setImageResource(R.drawable.icon);
    new FetchImageTask() { 
        protected void onPostExecute(Bitmap result) {
            if (result != null) {
                image.setImageBitmap(result);
            }
        }
    }.execute(item.getImageURL());

}

private class FetchImageTask extends AsyncTask&lt;String, Integer, Bitmap&gt; {
    @Override
    protected Bitmap doInBackground(String... arg0) {
        Bitmap b = null;
        try {
             b = BitmapFactory.decodeStream((InputStream) new  
       URL(arg0[0]).getContent());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } 
        return b;
    }   
}

     }
</code></pre>
