You are viewing an older version of Mapbox.js. Check out v3.3.1 for the latest.


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.


Factory Description
L.control.attribution( <Control.Attribution options> options? ) Creates an attribution control.


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.


Method Returns Description
setPrefix( <String> prefix ) this Sets the text before the attributions.
addAttribution( <String> text ) this Adds an attribution text (e.g. 'Vector data &copy; Mapbox').
removeAttribution( <String> text ) this Removes an attribution text.