When displaying an ESRI Leaflet Vector layers, map.attributionControl._esriAttributionLayerCount always gets increased by 1, but it never gets decreased. This has the side-effect that the dynamic attribution doesn't disappear when there's no ESRI layer visible at all (and might lead to an overflow when a user or a script hits MAX_INTEGER).
Describe the bug
When displaying an ESRI Leaflet Vector layers,
map.attributionControl._esriAttributionLayerCount
always gets increased by 1, but it never gets decreased. This has the side-effect that the dynamic attribution doesn't disappear when there's no ESRI layer visible at all (and might lead to an overflow when a user or a script hits MAX_INTEGER).Reproduction
https://jsbin.com/gaqaloguva/edit?html,console,output
1
in this case.Logs
No response
System Info
Additional Information
I've published this in esri-leaflet-core, since https://github.com/Esri/esri-leaflet-vector/ doesn't contain attribution control.