vue-leaflet/Vue2Leaflet

Add prop to remove attribution

Tobeyforce opened this issue · 2 comments

Are there any plans to create a prop on l-map similar to l-tile-layer where you can customize the default attribution of leaflet?
E.g I can't seem to find a way to remove the default "&copy Leaflet |" attribution in the bottom right corner (it seems like this is entirely OK by the creators).
Thoughts? Ideas for a workaround if the answer is no? :-)

mikeu commented

Hi @Tobeyforce , if all you want to do is remove the attribution control, then you should be able to set the attributionControl option on the map to false, something like

<l-map :options="{ attributionControl: false }">

(or of course using an options object defined in data).

Will that do the trick for you?

Hi @Tobeyforce , if all you want to do is remove the attribution control, then you should be able to set the attributionControl option on the map to false, something like

<l-map :options="{ attributionControl: false }">

(or of course using an options object defined in data).

Will that do the trick for you?

This indeed did remove the attribution entirely, the nice part was that when I added the l-control-attribution (since I still want other attributions required by OSM) they reappeared.
Excellent, thanks for helpfulness! Closing this.