BasemapGalleryViewModel

require(["esri/widgets/BasemapGallery/BasemapGalleryViewModel"], function(BasemapGalleryVM) { /* code goes here */ });
Class: esri/widgets/BasemapGallery/BasemapGalleryViewModel
Inheritance: BasemapGalleryViewModel Accessor
Since: ArcGIS API for JavaScript 4.3

Provides the logic for the BasemapGallery widget.

See also:

Constructors

new BasemapGalleryViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
Basemap

The map's basemap.

more details
more detailsBasemapGalleryViewModel
String

The name of the class.

more details
more detailsAccessor
Collection<BasemapGalleryItem>

A collection of BasemapGalleryItems representing basemaps.

more details
more detailsBasemapGalleryViewModel
LocalBasemapsSource | PortalBasemapsSource

The source for basemaps that the widget will display.

more details
more detailsBasemapGalleryViewModel
String

The view model's state.

more details
more detailsBasemapGalleryViewModel
MapView | SceneView

The view from which the widget will operate.

more details
more detailsBasemapGalleryViewModel

Property Details

activeBasemapBasemap

The map's basemap.

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

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

NameReturn TypeSummaryClass
Boolean

A convenience function to check basemap equality.

more details
more detailsBasemapGalleryViewModel

Method Details

basemapEquals(basemap1, basemap2){Boolean}

A convenience function to check basemap equality.

Parameters:
basemap1 Basemap

The basemap to compare against basemap2.

basemap2 Basemap

The basemap to compare against basemap1.

Returns:
TypeDescription
BooleanReturns true if both basemaps are equal, false otherwise.

API Reference search results

NameTypeModule
Loading...