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
CSS
esri/dijit/Basemap | Download source
Properties
Methods
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() | None | Finalizes the creation of the widget. |
Constructor Details
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
The URL to the thumbnail image for the basemap.
The title for the basemap.
Method Details
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.
Finalizes the creation of the widget. (Added at v3.12)