Browse Source

add parameter to force attribution image to be small

main
Aaron Parecki 7 years ago
parent
commit
6d31ee4b62
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      p3k/geo/StaticMap.php

+ 1
- 1
p3k/geo/StaticMap.php View File

@ -531,7 +531,7 @@ function generate($params, $filename, $assetPath) {
// Shrink the esri logo if the image is small // Shrink the esri logo if the image is small
if($width > 120) { if($width > 120) {
if($width < 220) {
if($width < 220 || k($params, 'attribution') == 'small') {
$shrinkFactor = 2; $shrinkFactor = 2;
imagecopyresampled($im, $logo, $width-round(imagesx($logo)/$shrinkFactor)-4, $height-round(imagesy($logo)/$shrinkFactor)-4, 0,0, round(imagesx($logo)/$shrinkFactor),round(imagesy($logo)/$shrinkFactor), imagesx($logo),imagesy($logo)); imagecopyresampled($im, $logo, $width-round(imagesx($logo)/$shrinkFactor)-4, $height-round(imagesy($logo)/$shrinkFactor)-4, 0,0, round(imagesx($logo)/$shrinkFactor),round(imagesy($logo)/$shrinkFactor), imagesx($logo),imagesy($logo));
} else { } else {

Loading…
Cancel
Save