Skip to content

Commit

Permalink
Merge pull request #1397 from gavinr-maps/export-attribution-string
Browse files Browse the repository at this point in the history
export the attribution string
  • Loading branch information
gavinr-maps authored Dec 17, 2024
2 parents e5e146a + c9e8818 commit ec06d20
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ export function setEsriAttribution (map) {
map.attributionControl._esriAttributionLayerCount = map.attributionControl._esriAttributionLayerCount + 1;
}

export function getEsriAttributionHtmlString () {
return POWERED_BY_ESRI_ATTRIBUTION_STRING;
}

export function removeEsriAttribution (map) {
if (!map.attributionControl) {
return;
Expand Down Expand Up @@ -353,7 +357,7 @@ export function _updateMapAttribution (evt) {
}
}

newAttributions = POWERED_BY_ESRI_ATTRIBUTION_STRING + ' | ' + newAttributions.substr(2);
newAttributions = getEsriAttributionHtmlString() + ' | ' + newAttributions.substr(2);
attributionElement.innerHTML = newAttributions;
attributionElement.style.maxWidth = calcAttributionWidth(map);

Expand All @@ -379,6 +383,7 @@ export var EsriUtil = {
extentToBounds: extentToBounds,
calcAttributionWidth: calcAttributionWidth,
setEsriAttribution: setEsriAttribution,
getEsriAttributionHtmlString: getEsriAttributionHtmlString,
removeEsriAttribution: removeEsriAttribution,
_setGeometry: _setGeometry,
_getAttributionData: _getAttributionData,
Expand Down

0 comments on commit ec06d20

Please sign in to comment.