public IEnumerable<PopupItem> ParseIdentifyResults(IDictionary<Layer, IEnumerable<IdentifyFeature>> identifyResults)
{
if (identifyResults == null)
return null;
IList<PopupItem> popupItems = new List<PopupItem>();
foreach (var layer in identifyResults.Keys)
{
var identifyFeatures = identifyResults[layer];
if (identifyFeatures == null)
continue;
foreach (var identifyFeature in identifyFeatures)
{
var popupInfo = GetPopupInfo(layer, identifyFeature.Item.LayerID);
if (popupInfo != null)
popupItems.Add(new PopupItem(identifyFeature, popupInfo));
}
}
return popupItems;
}