From a800242ee8f3e1bdd97088da59ee2f5867a8d2eb Mon Sep 17 00:00:00 2001 From: Franck ALARY Date: Wed, 6 Apr 2022 17:09:58 +0200 Subject: [PATCH] Update dependencies --- composer.json | 2 +- src/FrenchCadastralMap.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index a0d9b39..a3d1748 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "php": "^7.0", "dantsu/php-image-editor": "^1.0", - "dantsu/php-osm-static-api": "^0.1" + "dantsu/php-osm-static-api": "^0.2" }, "autoload": { "psr-4": { diff --git a/src/FrenchCadastralMap.php b/src/FrenchCadastralMap.php index 3763bc8..f3cade6 100644 --- a/src/FrenchCadastralMap.php +++ b/src/FrenchCadastralMap.php @@ -90,14 +90,14 @@ protected function getAttributionText() */ protected function getMapImage(): Image { - $bbox = $this->getBoundingBox(); + $mapData = $this->getMapData(); if ($this->displayOpenStreetMap) { $image = parent::getMapImage(); } else { $image = - Image::newCanvas($bbox->getOutputPxSize()->getX(), $bbox->getOutputPxSize()->getY()) - ->drawRectangle(0, 0, $bbox->getOutputPxSize()->getX(), $bbox->getOutputPxSize()->getY(), 'FFFFFF'); + Image::newCanvas($mapData->getOutputSize()->getX(), $mapData->getOutputSize()->getY()) + ->drawRectangle(0, 0, $mapData->getOutputSize()->getX(), $mapData->getOutputSize()->getY(), 'FFFFFF'); } $cadastralMap = new Image(); @@ -108,12 +108,12 @@ protected function getMapImage(): Image 'request=GetMap&' . 'layers=' . \implode(',', \array_unique($this->layers)) . '&' . 'styles=&' . - 'width=' . $bbox->getOutputPxSize()->getX() . '&' . - 'height=' . $bbox->getOutputPxSize()->getY() . '&' . + 'width=' . $mapData->getOutputSize()->getX() . '&' . + 'height=' . $mapData->getOutputSize()->getY() . '&' . 'format=image/png&' . 'transparent=true&' . 'crs=EPSG:4326&' . - 'bbox=' . $bbox->getBottomLeft()->getLat() . ',' . $bbox->getBottomLeft()->getLng() . ',' . $bbox->getTopRight()->getLat() . ',' . $bbox->getTopRight()->getLng() + 'bbox=' . $mapData->getLatLngBottomLeft()->getLat() . ',' . $mapData->getLatLngBottomLeft()->getLng() . ',' . $mapData->getLatLngTopRight()->getLat() . ',' . $mapData->getLatLngTopRight()->getLng() )) { $image->pasteOn($cadastralMap); }