diff --git a/src/Layers/BasemapLayer.js b/src/Layers/BasemapLayer.js index e0a72bdb7..0c2315fdb 100644 --- a/src/Layers/BasemapLayer.js +++ b/src/Layers/BasemapLayer.js @@ -204,8 +204,8 @@ export var BasemapLayer = L.TileLayer.extend({ if (this.options.attributionUrl) { Util._getAttributionData(this.options.attributionUrl, map); } - map.on('moveend', Util._updateMapAttribution); + map.on('moveend', Util._updateMapAttribution); L.TileLayer.prototype.onAdd.call(this, map); }, @@ -213,7 +213,8 @@ export var BasemapLayer = L.TileLayer.extend({ if (map.attributionControl) { map.attributionControl.removeAttribution('© Esri'); } - map.off('moveend', this._updateMapAttribution, this); + + map.off('moveend', Util._updateMapAttribution); L.TileLayer.prototype.onRemove.call(this, map); }, @@ -233,6 +234,7 @@ export var BasemapLayer = L.TileLayer.extend({ } return attribution; } + }); export function basemapLayer (key, options) { diff --git a/src/Util.js b/src/Util.js index a1e515da0..5a9aebaa1 100644 --- a/src/Util.js +++ b/src/Util.js @@ -183,6 +183,7 @@ export function _updateMapAttribution (evt) { newAttributions += (', ' + text); } } + newAttributions = newAttributions.substr(2); var attributionElement = map.attributionControl._container.querySelector('.esri-attributions');