Open rolson opened 4 months ago
Seeing that BasemapGalleryViewModel
is internal and tied to the lifetime of BasemapGallery
I think it'd need to be made external and managed by the view using `BasemapGallery or somewhere higher up. But I don't think that's a great idea as it puts more work on the user to now manage the model and it seems to go against this pattern:
View models should be internal and created by the main component view. Required model properties should be passed in as arguments to the view constructor, with additional properties set via view modifiers.
What I could see as a good alternative is providing a public helper property on Portal
that returns [BasemapGalleryItem]
to make BasemapGallery(items:geoModel:)
easier to use.
Phil left a similar but different idea on improving usability a while back here.
The basemap gallery re-queries the portal for the basemaps every time it's shown. Is there a way that we can avoid that?
I'm using the gallery like so: