예제 #1
0
 /**
  * Calculte map size
  */
 private function calculateSize()
 {
     $width = $this->refMapWidth;
     //$this->internalMap->width;
     $height = $this->refMapHeight;
     //$this->internalMap->height;
     if ($this->autoSize && ($this->decreaseHeight || $this->decreaseWidth)) {
         $minHeight = $this->refMapHeight / 3;
         $minWidth = $this->refMapWidth / 3;
         $stepHeight = $this->decreaseHeight ? $this->stepSize : 0;
         $stepWidth = $this->decreaseWidth ? $this->stepSize : 0;
         $size = PluginsMapUtils::calculateSize($this->internalMap, $this->refMapExtent, $this->refMapHeight, $this->refMapWidth, $minHeight, $minWidth, $stepHeight, $stepWidth);
         $width = $size['width'];
         $height = $size['height'];
     }
     pm_logDebug(4, $this->refMapExtent, 'refMapExtent 3:');
     pm_logDebug(4, "width={$width};height={$height}");
     $this->internalMap->setSize($width, $height);
     $this->internalMap->setExtent($this->refMapExtent->minx, $this->refMapExtent->miny, $this->refMapExtent->maxx, $this->refMapExtent->maxy);
     $this->refMapExtent = $this->internalMap->extent;
     $this->refMapWidth = $width;
     $this->refMapHeight = $height;
     $this->refMapMinX = $this->refMapExtent->minx;
     $this->refMapMinY = $this->refMapExtent->miny;
     $this->refMapMaxX = $this->refMapExtent->maxx;
     $this->refMapMaxY = $this->refMapExtent->maxy;
 }