本文整理汇总了PHP中Map::getWorldMap方法的典型用法代码示例。如果您正苦于以下问题:PHP Map::getWorldMap方法的具体用法?PHP Map::getWorldMap怎么用?PHP Map::getWorldMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map::getWorldMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: putOnMap
/**
* method puts scalebar onto map
*
* @param Layout $layout
*/
public function putOnMap($layout = null)
{
$this->setLogoLayout($layout);
$worldMap = $this->_map->getWorldMap();
$widthPx = $worldMap->getWidth();
$equatorPixelsPerKm = $widthPx / self::$earthCircumference;
$scale = $this->_calculateScale();
$label = $this->_findOutWhichLabel($scale, $equatorPixelsPerKm);
$this->_layout->putImage($this->_map, $this->_createScaleBarMap($label, $this->_calculateLengthOfScaleBar($label, $scale, $equatorPixelsPerKm)));
}
示例2: __construct
public function __construct(Map $map, Conf $conf)
{
$this->setImageHandler($map->getImageHandler());
$this->_logoLayout = LogoLayout::factory($conf->get('logo_layout'));
$this->_logoFiles = $conf->get('logo_files');
$this->setWorldMap($map->getWorldMap());
$leftUpCorner = $map->getLeftUpCorner();
$this->setLeftUpCorner($leftUpCorner['lon'], $leftUpCorner['lat']);
$rightDownCorner = $map->getRightDownCorner();
$this->setRightDownCorner($rightDownCorner['lon'], $rightDownCorner['lat']);
parent::__construct($map->getImage());
}