BasemapGalleryViewModel

AMD: require(["esri/widgets/BasemapGallery/BasemapGalleryViewModel"], (BasemapGalleryVM) => { /* code goes here */ });
ESM: import BasemapGalleryVM from "@arcgis/core/widgets/BasemapGallery/BasemapGalleryViewModel";
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.
Show inherited properties Hide inherited properties
Name Type Summary Class
Basemapmore details

The map's basemap.

more detailsBasemapGalleryViewModel
Stringmore details

The name of the class.

more detailsAccessor
Collection<BasemapGalleryItem>more details

A collection of BasemapGalleryItems representing basemaps.

more detailsBasemapGalleryViewModel
LocalBasemapsSource|PortalBasemapsSourcemore details

The source for basemaps that the widget will display.

more detailsBasemapGalleryViewModel
Stringmore details

The view model's state.

more detailsBasemapGalleryViewModel
MapView|SceneViewmore details

The view from which the widget will operate.

more detailsBasemapGalleryViewModel

Property Details

activeBasemap Basemap

The map's basemap.

declaredClass Stringreadonly 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, or a Portal instance. The default source is a PortalBasemapsSource that points to the default portal instance set in esriConfig.portalUrl.

state Stringreadonly

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
Booleanmore details

A convenience function to check basemap equality.

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:
Type Description
Boolean Returns true if both basemaps are equal, false otherwise.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.