Closed ddrury closed 4 years ago
Just looking at the images, without any code to test, I can only guess.
This plugin does nothing special with the attribution. It is done by Leaflet (or esri plugin) when setting the base map.
The comma before "Tiles @ Esri" looks like addAttribution
is being called (by Leaflet or Esri).
Have you tried with the original Control.Layers
from Leaflet? I have done a small example, and it has a strange behavior.
Solved it, Because I'm creating the layers dynamically, I have eg
layers = [
L.tileLayer ...,
L.tileLayer ...
]
but I was setting the base layer from another variable not from one of the layers items
Please see attached images, The first shows the map as loaded without using the layer selector (OpenStreetMap) The second shows the position after selecting an Esri layer
The box outlined in red shows the OpenStreetMap attribution that should have been replaced.
If I remove the OpenStreetMap attribution then everything works OK
Edit: using leaflet 1.6 with the markercluster library