change position of "powered by Leaflet" attribution

4,871 views
Skip to first unread message

amir lamdan

unread,
Jun 18, 2013, 1:50:19 PM6/18/13
to leafl...@googlegroups.com
As in the subject, I would like to move the Leaflet attribution from bottom right corner to top right.

how?

Bryan McBride

unread,
Jun 18, 2013, 9:38:41 PM6/18/13
to leafl...@googlegroups.com
Pass attributionControl: false when constructing your map and then add the attribution control with your position option.

map = new L.Map('map', {
attributionControl: false
});
L.control.attribution({position: 'topright'}).addTo(map);

amir lamdan

unread,
Jun 19, 2013, 9:22:16 AM6/19/13
to leafl...@googlegroups.com
Solved.
That solution works
 thanks

Chris

unread,
Apr 26, 2015, 9:37:55 PM4/26/15
to leafl...@googlegroups.com
For me, it shows then the attribution both on top and bottom. 

Chris

unread,
Apr 26, 2015, 9:42:45 PM4/26/15
to leafl...@googlegroups.com
Ok it worked - I had put the attributionControl to layer instead directly to the map.

Thanks
Reply all
Reply to author
Forward
0 new messages