BasemapGallery widget
This sample demonstrates how to display a BasemapGallery widget to allow users to switch between different basemaps.
By default, the BasemapGallery will display a list of basemaps from arcgis.com
.
If you have a portalUrl defined, then the BasemapGallery will display a list of basemaps defined in your Portal.
To update the list of basemaps displayed, set the source
property of the BasemapGallery. This can either point to a different portal source, or a local list of basemaps.
See Basemaps with different projections for an example defining a Portal
.
To create a custom list of basemaps from local sources, source
should be set to an array of basemaps representing LocalBasemapsSource, as shown in the following code snippet.