Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasemapGallery.Behavior developer basemaps from default portal #493

Open
williambohrmann3 opened this issue Feb 24, 2023 · 0 comments
Open

Comments

@williambohrmann3
Copy link
Collaborator

williambohrmann3 commented Feb 24, 2023

Upon loading the sample BasemapGalleryController.LoadFromDefaultPortal() calls PopulateFromDefaultList() which returns 27 developer basemaps from the default portal (https://arcgisonline.com). These populate the component's ListView. Upon clicking the "Load ArcGIS Online basemaps" button, the portal is set to the default. There is no call to GetDeveloperBasemapsAsync(), resulting in 30 basemaps in the gallery. This is a gallery item mismatch between startup and upon a button click, both referencing the default portal not the custom portal. Two potential solutions to remedy this:

  1. Removing code which filters the developer basemaps from PopulateFromDefaultList()
  2. Adding code which filters the developer basemaps in Button_Load_AGOL

Solution 2 could be tricky considering that BasemapGalleryItems can't be instantiated from the sample .cs file. Somehow calling PopulateFromDefaultList() from the button event is also tricky.

To emphasize that initially AGOL default portal items are loaded, it could be beneficial to have the "Load ArcGIS Online basemaps" button color fill to something like red upon starting the sample. A button click would update the button color fills to emphasize if it's the custom portal or default portal whose basemaps are loaded. This would work similarly to the .NET sketch-on-map sample buttons.

To further differentiate between the two portals, perhaps changing the custom portal to a public portal with unique basemaps would be beneficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant