PortalBasemapsSource

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

The PortalBasemapsSource class is a Portal-driven basemap source in the BasemapGalleryViewModel.

See also:

Constructors

new PortalBasemapsSource(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
Collection<Basemap>

A collection of Basemaps fetched from the source's Portal.

more details
more detailsPortalBasemapsSource
String

The name of the class.

more details
more detailsAccessor
Function

Function used to filter basemaps after being fetched from the Portal.

more details
more detailsPortalBasemapsSource
Portal

The Portal from which to fetch basemaps.

more details
more detailsPortalBasemapsSource
Object | String

An object with key-value pairs used to create a custom basemap gallery group query.

more details
more detailsPortalBasemapsSource
String

The source's state.

more details
more detailsPortalBasemapsSource
Function

Callback for updating basemaps after being fetched and filtered.

more details
more detailsPortalBasemapsSource

Property Details

A collection of Basemaps fetched from the source's Portal.

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

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

filterFunctionFunction

Function used to filter basemaps after being fetched from the Portal.

portalPortal

The Portal from which to fetch basemaps.

Since: ArcGIS API for JavaScript 4.5

An object with key-value pairs used to create a custom basemap gallery group query. Note that all parameters will be joined using the AND operator. A query string can also be provided for more advanced use cases.

Examples:
// query portal basemaps with an object
var source = new PortalBasemapsSource({
  query: {
    title: "United States Basemaps",
    owner: "Esri_cy_US"
  }
});
// query portal basemaps with a string
var source = new PortalBasemapsSource({
  query: "title:\"United States Basemaps\" AND owner:Esri_cy_US"
});
stateStringreadonly

The source's state.

Possible Values: not-loaded | loading | ready

Default Value:not-loaded
updateBasemapsCallbackFunction
Since: ArcGIS API for JavaScript 4.8

Callback for updating basemaps after being fetched and filtered.

Method Overview

NameReturn TypeSummaryClass

Refreshes basemaps by fetching them from the Portal.

more details
more detailsPortalBasemapsSource

Method Details

refresh()

Refreshes basemaps by fetching them from the Portal.

API Reference search results

NameTypeModule
Loading...