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.
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?
Best Answer
Map object (let's say it's
map
) has propertymap.attributionControl
which points to default map attribution control, where so called prefix is textLeaflet
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 textLeaflet
without the link, the code could look like this: