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

dojo.require("esri.dijit.Attribution");

Description

(Added at v3.1)
Displays attribution text for the layers in a map. The text displayed for the layers is either a list of data providers or sources as defined in the layer's custom attribution data, or the copyright text. The widget automatically updates based on layer visibility and map extent. The widget displays a single line of attribution that can be expanded with a single click to view all data sources.

When using the compact build, map attribution is false by default. To display attribution import the esri/dijit/Attribution module and set the map's construction option showAttribution to true.

For additional information on working with attribution please visit the official attribution in your app documentation.

Samples

Search for samples that use this class.

Constructors

NameSummary
new esri.dijit.Attribution(options, srcNodeRef)Creates a new Attribution object.

CSS

esri/dijit/Attribution | Download source

NameDescription
esriAttributionDelimThe element that contains the delimiter string for an attribution item. There can be one or more of these items.
esriAttributionItemThe element that contains text for a map layer. There can be more than one of these elements.
esriAttributionLastItemThe last visible item is used to determine wheter a trailing delimiter is displayed.
esriAttributionListRepresents the element that contains all the attribution items.

Properties

NameTypeSummary
itemDelimiterStringString used as the delimiter between attribution items.
itemNodesObjectObject containing elements where each element contains attribution text for a layer in the map.
listNodeHTMLSpanElementReference to the span element that contains all the attribution items.
mapMapReference to the map object for which the widget is displaying attribution.

Methods

NameReturn typeSummary
destroy()NoneDestroy the attribution widget.
startup()NoneFinalizes the creation of the widget.
Constructor Details

new esri.dijit.Attribution(options, srcNodeRef)

Creates a new Attribution object.
Parameters:
<Object> options Required An object that defines the attribution options. View the options list for details.
<Node | String> srcNodeRef Required HTML element where the attribution widget should be rendered.
options properties:
<String> itemDelimiter Optional String used as the delimiter between attribution items. The default is " | " (space pipe space).
<Map> map Required Reference to the map object.
Sample:
var attribution = new esri.dijit.Attribution({
  map: map
}, "attributionDiv");
Property Details

<String> itemDelimiter

String used as the delimiter between attribution items. The default is " | " (space pipe space).

<Object> itemNodes

Object containing elements where each element contains attribution text for a layer in the map.

<HTMLSpanElement> listNode

Reference to the span element that contains all the attribution items.

<Map> map

Reference to the map object for which the widget is displaying attribution.
Method Details

destroy()

Destroy the attribution widget.

startup()

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