LocalBasemapsSource

AMD: require(["esri/widgets/BasemapGallery/support/LocalBasemapsSource"], (LocalBasemapsSource) => { /* code goes here */ });
ESM: import LocalBasemapsSource from "@arcgis/core/widgets/BasemapGallery/support/LocalBasemapsSource";
Class: esri/widgets/BasemapGallery/support/LocalBasemapsSource
Inheritance: LocalBasemapsSource Accessor
Subclasses: PortalBasemapsSource
Since: ArcGIS API for JavaScript 4.3

The LocalBasemapsSource class is a Collection-driven Basemap 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("national-geographic"), // create a basemap from a well known id
     basemap
   ]
  }),
 view: view
});
view.ui.add(basemapGallery, 'top-right');

Constructors

new LocalBasemapsSource(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
Collection<Basemap>more details

A collection of Basemaps.

more detailsLocalBasemapsSource
Stringmore details

The name of the class.

more detailsAccessor
Stringmore details

The source's state.

more detailsLocalBasemapsSource

Property Details

basemaps Collection<Basemap>

A collection of Basemaps.

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.

state Stringreadonly

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

Method Overview

Name Return Type Summary Class
more details

Refreshes the source basemaps.

more detailsLocalBasemapsSource

Method Details

refresh()

Refreshes the source basemaps. Note: refresh will not affect LocalBasemapsSource. Modify basemaps directly instead.

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