Class: BasemapLayer

Description

Class added v2.1.

Defines a layer that will be added to a basemap and displayed in the BasemapGallery dijit.

Samples

Search for samples that use this class.  

Class hierarchy

esri.dijit.BasemapLayer

Constructor

Constructor Description
esri.dijit.BasemapLayer(params?) Creates a new BasemapLayer object.
Constructor Detail

esri.dijit.BasemapLayer(params?)

Creates a new BasemapLayer object.
Parameters:
<Object> params Optional Set of parameters used to create a basemap layer. See the list below for details.
Options:
<Number[]> bandIds Optional. If the url points to an image service, you can specify which band ids will display. If not set, the first three available band ids will display.
<Number[]> displayLevels Optional. If the url points to a cached map service you can specify the levels to draw. If not set, all display levels the service supports are drawn.
<Boolean> isReference Optional. Set to true if the layer is a reference layer and should be drawn on top of all other layers in the map.
<String> type The type of layer, valid values are "BingMapsAerial", "BingMapsHybrid", "BingMapsRoad", "OpenStreetMap". Must specify either the url or type parameter.
<String> url URL to the ArcGIS Server REST resource that represents a map or image service. Must specify either the url or type parameter.
<Number[]> visibleLayers Optional. If the url points to a dynamic map service you can specify a subset of layers to display. If not set, all visible layers are displayed.
Code snippets:
var publicSafetyLayer = new esri.dijit.BasemapLayer({
  url:"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyBasemap/MapServer"
});