BasemapGalleryViewModel
require(["esri/widgets/BasemapGallery/BasemapGalleryViewModel"], function(BasemapGalleryVM) { /* code goes here */ });esri/widgets/BasemapGallery/BasemapGalleryViewModelProvides the logic for the BasemapGallery widget.
- See also:
Constructors
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
| Name | Type | Summary | Class | |
|---|---|---|---|---|
| activeBasemap | Basemap | The map's basemap. more details | more details | BasemapGalleryViewModel |
| declaredClass | String | The name of the class. more details | more details | Accessor |
| items | Collection<BasemapGalleryItem> | A collection of BasemapGalleryItems representing basemaps. more details | more details | BasemapGalleryViewModel |
| source | LocalBasemapsSource | PortalBasemapsSource | The source for basemaps that the widget will display. more details | more details | BasemapGalleryViewModel |
| state | String | The view model's state. more details | more details | BasemapGalleryViewModel |
| view | MapView | SceneView | The view from which the widget will operate. more details | more details | BasemapGalleryViewModel |
Property Details
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className.
- itemsCollection<BasemapGalleryItem>
A collection of BasemapGalleryItems representing basemaps.
The source for basemaps that the widget will display. This property can be autocast with an array or Collection of Basemaps, a Portal instance or a URL to a portal instance. The default source is a PortalBasemapsSource that points to the default portal instance set in esriConfig.portalUrl.
- stateStringreadonly
The view model's state.
Possible Values: ready | disabled
- Default Value:disabled
The view from which the widget will operate. This view provides access to the active basemap via the view's map property.
Method Overview
| Name | Return Type | Summary | Class | |
|---|---|---|---|---|
| basemapEquals() | Boolean | A convenience function to check basemap equality. more details | more details | BasemapGalleryViewModel |
Method Details
- basemapEquals(basemap1, basemap2){Boolean}
A convenience function to check basemap equality.
Parameters:basemap1 BasemapThe basemap to compare against
basemap2.basemap2 BasemapThe basemap to compare against
basemap1.Returns:Type Description Boolean Returns trueif both basemaps are equal,falseotherwise.
API Reference search results
| Name | Type | Module |
|---|