import LocalBasemapsSource from "@arcgis/core/widgets/BasemapGallery/support/LocalBasemapsSource.js";const LocalBasemapsSource = await $arcgis.import("@arcgis/core/widgets/BasemapGallery/support/LocalBasemapsSource.js");- Inheritance
- LocalBasemapsSource→
Accessor
- 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.
- Example
- // in this example, the portal item is a webmaplet 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 idbasemap]}),view: view});view.ui.add(basemapGallery, 'top-right');
Constructors
Constructor
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| 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.
| Property | Type | Class |
|---|---|---|
| | ||
| readonly inherited | ||
| readonly | |