I will use the leaflet for a display showing a historical map of the history museum. It works on a local network that is not connected to the Internet, and visitors can manipulate the map with a stylus to learn about historical matters.

enter image description here

Leaflet will automatically generate a link to leafletjs.com in the attribution. However, this link does not work because it is on a local network, and if a visitor accidentally touches it with a stylus, an inaccessible error screen will appear, confusing the visitor.

Is it possible to suppress this link to leafletjs.com?

1 Answer 1


Map object (let's say it's map) has property map.attributionControl which points to default map attribution control, where so called prefix is text Leaflet with a link to the Leaflet home page.

Attribution control prefix can be changed with the .setPrefix method (see https://leafletjs.com/reference.html#control-attribution-option). So to change prefix to text Leaflet without the link, the code could look like this:

  • Thank you very much!!!
    – kochizufan
    Jan 11 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.