Attributions, as a reminder, are the way to mention credits for layers sources that reference source of the tiles and/or data. The ol.control.Attribution
control is dedicated for this.
First, copy the example dedicated to the defaults controls in a new file.
Next, change the
ol.control.defaults
options in thecontrols
property of the map, and also setlogo
options tofalse
at theol.Map
level:logo: false controls: ol.control.defaults({ attributionOptions: { }, }),
Open your browser (we suppose you are using Google Chrome).
Now, add in
attributionOptions
to the following content and reload the page:attributionOptions: { className: 'myCustomClass' },
Use the Chrome Developers tools to find the element with
myCustomClass
to try to understand the effect of theclassName
option inattributionOptions
.Now, again add a new property in
attributionOptions
:attributionOptions: { className: 'myCustomClass', target: document.getElementById...