diff --git a/src/Canvas/Canvas.php b/src/Canvas/Canvas.php index e822816..5f608a9 100644 --- a/src/Canvas/Canvas.php +++ b/src/Canvas/Canvas.php @@ -14,7 +14,7 @@ class Canvas protected $zoom = 0; - public function __construct(int $width, int $height, int $zoom, int $centerX, int $centerY) + public function __construct(int $width, int $height, int $zoom, float $centerX, float $centerY) { $this->width = $width; $this->height = $height; @@ -42,12 +42,12 @@ class Canvas return $this->height; } - public function getCenterX(): int + public function getCenterX(): float { return $this->centerX; } - public function getCenterY(): int + public function getCenterY(): float { return $this->centerY; } diff --git a/src/ElementPrinter/Marker/MarkerPrinter.php b/src/ElementPrinter/Marker/MarkerPrinter.php index 9d11c78..ae58fea 100644 --- a/src/ElementPrinter/Marker/MarkerPrinter.php +++ b/src/ElementPrinter/Marker/MarkerPrinter.php @@ -63,6 +63,7 @@ class MarkerPrinter $markerFilename = ''; $markerShadow = ''; $matches = false; + $markerIndex = 0; // check for marker type, get settings from markerPrototypes if ($this->marker->getMarkerType()) { diff --git a/src/Printer.php b/src/Printer.php index cddab90..e1ee245 100644 --- a/src/Printer.php +++ b/src/Printer.php @@ -215,7 +215,7 @@ class Printer public function copyrightNotice() { $logoImg = imagecreatefrompng($this->osmLogo); - imagecopy($this->canvas->getImage(), $logoImg, imagesx($this->image) - imagesx($logoImg), imagesy($this->image) - imagesy($logoImg), 0, 0, imagesx($logoImg), imagesy($logoImg)); + imagecopy($this->canvas->getImage(), $logoImg, imagesx($this->canvas->getImage()) - imagesx($logoImg), imagesy($this->canvas->getImage()) - imagesy($logoImg), 0, 0, imagesx($logoImg), imagesy($logoImg)); } public function sendHeader()