Legacy
Mapbox.js is no longer in active development. To learn more about our newer mapping tools see Mapbox GL JS.
You are viewing an older version of Mapbox.js. Check out v3.3.1 for the latest.
Control.Attribution
The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its attributionControl
option to false
, and it fetches attribution texts from layers with getAttribution
method automatically. Extends Control.
Creation
Factory | Description |
---|---|
L.control.attribution(
|
Creates an attribution control. |
Options
Option | Type | Default | Description |
---|---|---|---|
position |
String |
'bottomright' |
The position of the control (one of the map corners). See control positions. |
prefix |
String |
'Leaflet' |
The HTML text shown before the attributions. Pass false to disable. |
Methods
Method | Returns | Description |
---|---|---|
setPrefix(
|
this |
Sets the text before the attributions. |
addAttribution(
|
this |
Adds an attribution text (e.g. 'Vector data © Mapbox' ). |
removeAttribution(
|
this |
Removes an attribution text. |