From d834667d8a52aa92fcae6cd3713206f8dc0070c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20Hu=CC=88bner?= Date: Thu, 8 Jun 2017 22:55:20 +0200 Subject: [PATCH] Some fixes. --- src/Canvas/Canvas.php | 6 +++--- src/ElementPrinter/Marker/MarkerPrinter.php | 1 + src/Printer.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) 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()