// Called when a row is tapped.
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Get the portal item for the selected row.
            PortalItem webMapItem = _webMapItemsList[indexPath.Row];

            // Raise the selection event with an argument containing the selected portal item.
            var webMapSelectedArgs = new WebMapSelectedEventArgs(webMapItem);

            OnWebMapSelected(this, webMapSelectedArgs);
        }
        private void WebMapTableSource_OnWebMapSelected(object sender, WebMapSelectedEventArgs e)
        {
            try
            {
                // Get the web map (portal item) that was selected.
                var webMap = e.SelectedWebMapItem;
                if (webMap != null)
                {
                    // Create a new map from the portal item and display it in the map view.
                    var map = new Map(webMap);
                    _myMapView.Map = map;
                }

                _messagesLabel.Text = "Loaded web map from item " + webMap.ItemId;
            }
            catch (Exception ex)
            {
                // Report error.
                _messagesLabel.Text = "Exception: " + ex.Message;
            }
        }