Thursday, May 23, 2024
 Popular · Latest · Hot · Upcoming
67
rated 0 times [  69] [ 2]  / answers: 1 / hits: 5938  / 11 Years ago, tue, january 7, 2014, 12:00:00

I have included an OpenLayers.Map in my site per JavaScript:



var map = new OpenLayers.Map();
var mapnik = new OpenLayers.Layer.OSM();
map.addLayer(mapnik);


All works fine. Expect the position of the attribution (OpenStreetMap contributors). Are there any option move the attribution in the lower right corner?



Here is what i got currently:
OpenStreetMap


More From » openlayers

 Answers
12

You can override the default OL style for this component:


.olControlAttribution {
left: 5px;
}

You can try this out by going to https://openlayers.org/en/latest/examples/attributions.html and executing the following JS code in your browser's console:


document.getElementsByClassName('olControlAttribution')[0].style.left='5px'

[#48911] Tuesday, January 7, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
claudiofredye

Total Points: 583
Total Questions: 101
Total Answers: 115

Location: Sao Tome and Principe
Member since Wed, Dec 29, 2021
2 Years ago
;