How to remove attribution in Leaflet?

The Leaflet way: L.map('map', {attributionControl: false, etc...})

A simple $('.leaflet-control-attribution').hide() or non jQuery document.getElementsByClassName( 'leaflet-control-attribution' )[0].style.display = 'none';.

Vladimir himself says it's OK to remove it: https://groups.google.com/d/msg/leaflet-js/fA6M7fbchOs/JTNVhqdc7JcJ, but it seems like you should leave it or acknowledge Leaflet in some way.


This is perfectly explained in the Leaflet API reference for map options.


For those using react-leaflet, use:

<Map attributionControl={false} />