Simply change to
//String selectedValue = (String) getListAdapter().getItem(position);
String selectedValue = markers.get(position).getTitle();
or try overriding getItem()
and return the item there.
Edit
I am not sure of your data but you can return your data object in getItem() something like this
@Override
public Object getItem(int position) {
return "123";
}
this is only a sample.. if you will call getListAdapter().getItem(position)
now, it will return 123 string , you can modify it to your requirement of data.