Skip to content

Commit 744b1cb

Browse files
committed
adding getAttributionText method
1 parent 9b55698 commit 744b1cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/OpenStreetMap.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ protected function getMapImage(): Image
164164
return $image;
165165
}
166166

167+
/**
168+
* get attribution text
169+
* @return string Attribution text
170+
*/
171+
protected function getAttributionText() {
172+
return '© OpenStreetMap contributors';
173+
}
174+
167175
/**
168176
* Draw OpenStreetMap attribution at the right bottom of the image
169177
* @param Image $image The image of the map
@@ -174,7 +182,7 @@ protected function drawAttribution(Image $image): Image
174182
$margin = 5;
175183
$attribution = function (Image $image, $margin): array {
176184
return $image->writeTextAndGetBoundingBox(
177-
'© OpenStreetMap contributors',
185+
$this->getAttributionText(),
178186
__DIR__ . '/resources/font.ttf',
179187
10,
180188
'0078A8',

0 commit comments

Comments
 (0)