Can I Remove the Leaflet Logo?

16361 views
Skip to first unread message

rziege...@gmail.com

unread,
Feb 13, 2013, 9:40:55 AM2/13/13
to leafl...@googlegroups.com
I am producing a map that needs to look very clean. Is there a way to remove the "Powered By Leaflet" logo and Link in the lower right corner?

 Thank You.

Ricardo Freitas

unread,
Feb 13, 2013, 10:44:58 AM2/13/13
to leaflet-js
You can, but should you? :)

set the attributionControl to false when setting your map options.

This should take care of the problem.


On Wed, Feb 13, 2013 at 2:40 PM, <rziege...@gmail.com> wrote:
I am producing a map that needs to look very clean. Is there a way to remove the "Powered By Leaflet" logo and Link in the lower right corner?

 Thank You.

--
 
---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Arnie Shore

unread,
Feb 13, 2013, 11:02:17 AM2/13/13
to leafl...@googlegroups.com
From a lurker: Simple courtesy to the developers in appreciation for
donating their time and talent to the user community suggests that you
don't hide the fact of their contribution.

My grandmother might say "clean, schmean."

AS

Bryan McBride

unread,
Feb 13, 2013, 11:16:45 PM2/13/13
to leafl...@googlegroups.com
If you want to just remove the Leaflet attribution from the control, while maintaining individual layer attribution, you can use the setPrefix method as documented here: http://leafletjs.com/reference.html#control-attribution. I personally don't see any issue with removing the attribution from the map to save screen real estate or for aesthetics, but I would provide attribution somewhere- maybe an about popup or something.

ben wyss

unread,
Feb 14, 2013, 3:45:23 AM2/14/13
to leafl...@googlegroups.com
I also would like to move the logo to the bottom right, so I tired:

    L.control.attribution ({
            position: 'bottomright',
    }).addTo(map);

but then I get this:


Ben


Ricardo Freitas

unread,
Feb 14, 2013, 5:08:58 AM2/14/13
to leaflet-js
Maybe with that code you are positioning previous attribution layers to the bottom right while adding a new one...makes sense?

Try something: remove the attribution altogether and check if it did disappear. If so, add the code you showed.  
Screen Shot 2013-02-14 at 9.44.52 AM.png

Vladimir Agafonkin

unread,
Feb 19, 2013, 4:24:06 PM2/19/13
to leafl...@googlegroups.com
To move it, use:
map.attributionControl.setPosition(...)

But you are absolutely free to remove it. It is there by default to help with Leaflet adoption (because many devs don't care if it's present), but it's not required by any means.

In other news, I've adjusted the default prefix in master recently — got rid of the "powered by", now it's just a Leaflet link with a "|" separator — much less obtrusive. What do you think guys?


2013/2/14 Ricardo Freitas <ricardo...@fixeads.com>
Screen Shot 2013-02-14 at 9.44.52 AM.png

Ricardo Freitas

unread,
Feb 20, 2013, 5:17:44 AM2/20/13
to leaflet-js
Perfect. I don't mind at all to have the leaflet "word" there. The powered by was kind of "in the way" of the map. Good job. It's "live" already?
Screen Shot 2013-02-14 at 9.44.52 AM.png
Reply all
Reply to author
Forward
0 new messages