Skip to content

Commit

Permalink
Improve the loading speed of the basemap gallery (#599)
Browse files Browse the repository at this point in the history
Co-authored-by: Morten Nielsen <[email protected]>
  • Loading branch information
dotMorten and Morten Nielsen authored Aug 30, 2024
1 parent fd341b9 commit d7eb824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,20 +324,10 @@ private static async Task<IList<BasemapGalleryItem>> PopulateFromDefaultList(Can
listOfBasemaps.Add(new BasemapGalleryItem(basemap));
}

#if !WINDOWS_XAML && !NETCOREAPP
await Task.WhenAll(listOfBasemaps.Select(gi => gi.LoadAsync()));
#else
foreach (var item in listOfBasemaps)
{
try
{
await item.LoadAsync();
}
catch (Exception)
{
}
_ = item.LoadAsync();
}
#endif
return new ObservableCollection<BasemapGalleryItem>(listOfBasemaps);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public string Name
{
get
{
return _nameOverride ?? Basemap.Name;
return _nameOverride ?? (string.IsNullOrEmpty(Basemap.Name) ? Basemap.Item?.Name ?? string.Empty : Basemap.Name);
}

set
Expand Down

0 comments on commit d7eb824

Please sign in to comment.