에러 내용은
ERROR/AndroidRuntime(8313): Caused by: java.lang.IllegalStateException: You are only allowed to have a single MapView in a MapActivity
입니다.
짧은 영어로 해석해보면... 맵액티비티에 맵뷰는 오직 한개만된다?? 인거 같은데..
리스트뷰의 각 로우에 맵뷰를 넣을순 없는건가요??
로우가 한개일때는 에러가없는데 두번째 로우 읽을때 바로 에러가 뜨네요..
어떻게해야 각 로우마다 맵뷰를 보여줄수잇을까요??
ps: 어댑터나 맵액티비티 그 어디서도 저 맵뷰를 불러오지 않고있습니다. 오직 xml에만 맵뷰가 써있는상태에요..
-- 로우.xml --
<리니어>
<TextView
android:id="@+id/row_message"
android:gravity="center_vertical"
android:textColor="#000"
android:textSize="16sp"
android:typeface="serif"
android:paddingLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="fill_parent" />
<com.google.android.maps.MapView
android:layout_gravity="center_horizontal"
android:layout_width="200dp"
android:layout_height="200dp"
android:padding="7dp"
android:clickable="false"
android:apiKey="KEY />
</리니어>
public class MapAdapter extends ArrayAdapter<MapVo>{
private int resId = 0;
private LayoutInflater inflater;
public MapAdapter(Context context, int resId, ArrayList<MapVo> items){
super(context, 0, items);
this.resId = resId;
inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public View getView(int position, View convertView, ViewGroup parent){
View view = inflater.inflate(resId, parent, false); // <-- 요기를 두번째 읽을때 에러가 납니다 ㅠㅠ
TextView message;
try{
message = (TextView)view.findViewById(R.id.row_message);
}
catch(ClassCastException e){}
...
}



