Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to remove leaflet link with image

I am use leaflet-directive to create map using leaflet.

Is it possible to remove leaflet link and OSM copyright from the map.

I wish to put in leaflet image instead.

like image 419
Alvin Avatar asked Oct 12 '15 08:10

Alvin


People also ask

Can I remove Leaflet attribution?

You can remove the entire attribution control when you create the map by setting attributionControl: false. If you just want to remove (or change) the default Leaflet attribution, you can do something like this: map. attributionControl. setPrefix("Developed by me").

What is attribution in Leaflet?

The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its attributionControl option to false , and it fetches attribution texts from layers with the getAttribution method automatically.

What is tile layer in Leaflet?

Used to load and display tile layers on the map, implements ILayer interface.


1 Answers

When creating the map object, try this:

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

It worked for me

like image 84
Stef Verdonk Avatar answered Oct 08 '22 14:10

Stef Verdonk