You can remove the link on the elevator with the image

I use leaflet-directive to create a map using flyers.

Is it possible to remove the link with the elevator and OSM copyright from the card.

Instead, I would like to place an image in a sheet.

+6
source share
3 answers

It is probably not legal to delete copying information, but if you are familiar with JavaScript searches in the text of the booklet for

'leaflet-control-attribution' 

Hello

0
source

When creating a map object, try the following:

 var map = L.map('map', { attributionControl:false }); 

It worked for me

+13
source

The link to the attribution control instance is stored in the attributionControl property of your L.Map instance:

 var map = new L.Map('map').setView([0, 0], 0); attribution = map.attributionControl; 

When you have this, you can use the setPrefix method to set a new prefix:

 attribution.setPrefix('<img src="image.png">'); 

http://leafletjs.com/reference.html#control-attribution-setprefix

+5
source

All Articles