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
CSS
esri/dijit/Attribution | Download source
esriAttributionDelim | The element that contains the delimiter string for an attribution item. There can be one or more of these items. |
esriAttributionItem | The element that contains text for a map layer. There can be more than one of these elements. |
esriAttributionLastItem | The last visible item is used to determine wheter a trailing delimiter is displayed. |
esriAttributionList | Represents the element that contains all the attribution items. |
Properties
itemDelimiter | String | String used as the delimiter between attribution items. |
itemNodes | Object | Object containing elements where each element contains attribution text for a layer in the map. |
listNode | HTMLSpanElement | 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. |
Methods
destroy() | None | Destroy the attribution widget. |
startup() | None | Finalizes the creation of the widget. |
Constructor Details
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 used as the delimiter between attribution items. The default is " | " (space pipe space).
Object containing elements where each element contains attribution text for a layer in the map.
Reference to the span element that contains all the attribution items.
Reference to the map object for which the widget is displaying attribution.
Method Details
Destroy the attribution widget.
Finalizes the creation of the widget. (Added at v3.12)