Skip to content

Commit c9e8818

Browse files
committed
export the attribution string
for other libraries (like esri-leaflet-vector) to use
1 parent e5e146a commit c9e8818

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Util.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ export function setEsriAttribution (map) {
224224
map.attributionControl._esriAttributionLayerCount = map.attributionControl._esriAttributionLayerCount + 1;
225225
}
226226

227+
export function getEsriAttributionHtmlString () {
228+
return POWERED_BY_ESRI_ATTRIBUTION_STRING;
229+
}
230+
227231
export function removeEsriAttribution (map) {
228232
if (!map.attributionControl) {
229233
return;
@@ -353,7 +357,7 @@ export function _updateMapAttribution (evt) {
353357
}
354358
}
355359

356-
newAttributions = POWERED_BY_ESRI_ATTRIBUTION_STRING + ' | ' + newAttributions.substr(2);
360+
newAttributions = getEsriAttributionHtmlString() + ' | ' + newAttributions.substr(2);
357361
attributionElement.innerHTML = newAttributions;
358362
attributionElement.style.maxWidth = calcAttributionWidth(map);
359363

@@ -379,6 +383,7 @@ export var EsriUtil = {
379383
extentToBounds: extentToBounds,
380384
calcAttributionWidth: calcAttributionWidth,
381385
setEsriAttribution: setEsriAttribution,
386+
getEsriAttributionHtmlString: getEsriAttributionHtmlString,
382387
removeEsriAttribution: removeEsriAttribution,
383388
_setGeometry: _setGeometry,
384389
_getAttributionData: _getAttributionData,

0 commit comments

Comments
 (0)