Skip to content

Commit

Permalink
Improve the loading speed of the basemap gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Nielsen committed Aug 29, 2024
1 parent fd341b9 commit 088a15d
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 088a15d

Please sign in to comment.