Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: Basemap

require(["esri/dijit/Basemap"], function(Basemap) { /* code goes here */ });

Description

(Added at v2.1)
Define a basemap to display in the BasemapGallery dijit.

Samples

Search for samples that use this class.

Constructors

NameSummary
new Basemap(params)Creates a new Basemap Object.

CSS

esri/dijit/Basemap | Download source

Properties

NameTypeSummary
idStringThe basemap's id.
thumbnailUrlStringThe URL to the thumbnail image for the basemap.
titleStringThe title for the basemap.

Methods

NameReturn typeSummary
getLayers()BasemapLayer[]The list of layers contained in the basemap or a dojo.Deferred if a call to ArcGIS.com needs to be made to retrieve the list of ArcGIS.com basemaps.
startup()NoneFinalizes the creation of the widget.
Constructor Details

new Basemap(params)

Creates a new Basemap Object.
Parameters:
<Object> params Required Set of parameters used to create a basemap. See options list.
params properties:
<String> id Optional The id of the basemap. An id will be automatically generated if one is not specified.
<BasemapLayer[]> layers Required An array of layers to add to the basemap.
<String> thumbnailUrl Optional A URL to a thumbnail image for the basemap that will be displayed in the BasemapGallery. If no thumbnail is is provided the gallery will display a blank. The default size for the image is 100 x 67 pixels.
<String> title Optional Title for the basemap. This value is displayed in the BasemapGallery below the thumbnail image.
Sample:
require([
  "esri/dijit/Basemap", ... 
], function(Basemap, ... ) {
  var waterBasemap = new Basemap({
    layers: [waterTemplateLayer],
    title: "Water Template",
    thumbnailUrl:"images/waterThumb.png"
  });
  ...
});
Property Details

<String> id

The basemap's id.

<String> thumbnailUrl

The URL to the thumbnail image for the basemap.

<String> title

The title for the basemap.
Method Details

getLayers()

The list of layers contained in the basemap or a dojo.Deferred if a call to ArcGIS.com needs to be made to retrieve the list of ArcGIS.com basemaps.
Return type: BasemapLayer[]

startup()

Finalizes the creation of the widget. (Added at v3.12)
Show Modal