将图像添加到自定义信息窗口android google maps api

时间:2014-03-13 19:43:46

标签: android api maps

我正在尝试将20个独特的图像添加到20个不同的自定义信息窗口中。但是当我运行程序时,所有图像看起来都是一样的。

map.setInfoWindowAdapter(new InfoWindowAdapter(){

  @Override
  public View getInfoContents(Marker marker) {

  View v = getLayoutInflater().inflate(R.layout.custommarker, null);
  LinearLayout ll = (LinearLayout)v.findViewById(R.id.ll);

  ImageView title = new ImageView(this);
  title.setImage(Bitmap);
  ll.addView(title);   



  return v;

}

 @Override
 public View getInfoWindow(Marker arg0) {
    return null;        
}                                     
}); 

0 个答案:

没有答案
相关问题