Skip to content

Commit

Permalink
Reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
mstefarov committed Jun 23, 2023
1 parent bce6257 commit 48fed59
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ private async void mapView_GeoViewTapped(object sender, GeoViewInputEventArgs e)
private Popup GetPopup(IdentifyLayerResult result)
{
if (result == null)
{
return null;
}

var popup = result.Popups.FirstOrDefault();
if (popup != null)
{
Expand Down Expand Up @@ -93,6 +96,7 @@ private Popup BuildPopupFromGeoElement(IdentifyLayerResult result)
return new Popup(geoElement, popupDefinition);
}
}

return Popup.FromGeoElement(geoElement);
}
return BuildPopupFromGeoElement(result.SublayerResults);
Expand All @@ -101,12 +105,16 @@ private Popup BuildPopupFromGeoElement(IdentifyLayerResult result)
private Popup BuildPopupFromGeoElement(IEnumerable<IdentifyLayerResult> results)
{
if (results == null)
{
return null;
}
foreach (var result in results)
{
var popup = BuildPopupFromGeoElement(result);
if (popup != null)
{
return popup;
}
}
return null;
}
Expand Down

0 comments on commit 48fed59

Please sign in to comment.