Skip to content
import LocalBasemapsSource from "@arcgis/core/widgets/BasemapGallery/support/LocalBasemapsSource.js";
Inheritance:
LocalBasemapsSourceAccessor
Subclasses:
PortalBasemapsSource
Since
ArcGIS Maps SDK for JavaScript 4.3

The LocalBasemapsSource class is a Collection-driven Basemap BasemapGalleryViewModel.source in the BasemapGalleryViewModel or BasemapGallery widget.

See also
Example
// in this example, the portal item is a webmap
let basemap = new Basemap({
portalItem: {
id: "867895a71a1840399476fc717e76bb43" // Mid-Century Map
}
});
let basemapGallery = new BasemapGallery({
source: new LocalBasemapsSource({
basemaps: [
Basemap.fromId("topo-vector"), // create a basemap from a well known id
basemap
]
}),
view: view
});
view.ui.add(basemapGallery, 'top-right');

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
state
readonly

basemaps

autocast Property
Type
Collection<Basemap>

A collection of Basemaps.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

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

state

readonly Property
Type
BasemapsSourceState

The source's state. The state is always ready.