Atlaslog
Atlaslog / OpenLayers / API reference / Attribution
OpenLayers · API reference

Attribution

Quick answer

Attribution is the ol.control.Attribution collapsible copyright control that aggregates attributions declared by visible layers and sources. Add it through map.addControl or let the default controls create it, then tune className, collapsible, collapsed, tipLabel and target. The control only displays text supplied via each source's attributions option, so it never generates content on its own.

Last verified 2026-11-03 · OpenLayers 10.3.1 · Cite this page
new ol.control.Attribution( options )
Key points
Example
var osm = new ol.layer.Tile({
  source: new ol.source.OSM({
    attributions: '© OpenStreetMap contributors'
  })
});

var wms = new ol.layer.Image({
  source: new ol.source.ImageWMS({
    url: 'https://example.com/geoserver/wms',
    params: { LAYERS: 'demo:landuse' },
    attributions: '数据来源:市规划院'
  }),
  visible: false
});

var attribution = new ol.control.Attribution({ collapsed: false });
map.addControl(attribution);
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). Attribution. https://www.jingweizhi.com/en/openlayers/api/attribution.html (accessed 2026-11-03).