/** * method checks if width of the map is given correct * * @return bool */ protected function _checkWidth() { $width = $this->_mapData->getWidth(); if (is_null($width) || !is_numeric($width) || $width <= 0) { return false; } return true; }
/** * create output map from the temoporary one * * @param Map $map */ private function _prepareOutputMap($map) { $image = $map->getImage(); $outputMapLeftUpInPixels = $this->_getLeftUpCornerForCutingResultMap($map); $resultMap = new Map($this->_createResultMapImage($image, $outputMapLeftUpInPixels['x'], $outputMapLeftUpInPixels['y'], $this->_mapData->getWidth(), $this->_mapData->getHeight())); $this->_setUpResultMapCorners($resultMap); $resultMap->setWorldMap($this->_worldMap); $resultMap->setImageHandler($this->_tileSource->getImageHandler()); return $resultMap; }