Class: Attribution

ol.Attribution

An attribution for a layer source.

Example:

source: new ol.source.OSM({
  attributions: [
    new ol.Attribution({
      html: 'All maps © ' +
          '<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
    }),
    ol.source.OSM.ATTRIBUTION
  ],
..

new ol.Attribution(options)

src/ol/attribution.js, line 30
Name Type Description
options

Attribution options.

Name Type Description
html string

HTML markup for this attribution.

Methods

getHTML(){string}

src/ol/attribution.js, line 53

Get the attribution markup.

Returns:
The attribution HTML.