Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck ALARY committed Apr 6, 2022
1 parent d7d5388 commit a800242
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
12 changes: 6 additions & 6 deletions src/FrenchCadastralMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
}
Expand Down

0 comments on commit a800242

Please sign in to comment.