I have just tried implementing the LocationMediaItem
in my Xamarin.iOS
app using JSQMessagesViewController
. Everything worked out fine, only problem is that the UICollectionView
cell which is supposed to show the location is stuck on loading forever and the map is never actually being displayed.
Here's some code how I make the locationMediaItem
in C#:
var locationMediaItem = new LocationMediaItem(new CLLocation(latitude, longitude));
if (ChatDB.Messages[indexPath.Row].user_id == SenderId)
{
locationMediaItem.AppliesMediaViewMaskAsOutgoing = true;
return JSQMessagesViewController.Message.Create(ChatDB.Messages[indexPath.Row].user_id, User.Instance.name, locationMediaItem);
}
Here is an image of what I mean:
So the JSQMessagesViewController
knows I want it to display a map view, but it never stops loading and I can't figure out why.
Hope somebody can help out.