本文整理汇总了PHP中Map::setRightDownCorner方法的典型用法代码示例。如果您正苦于以下问题:PHP Map::setRightDownCorner方法的具体用法?PHP Map::setRightDownCorner怎么用?PHP Map::setRightDownCorner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map::setRightDownCorner方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setUpResultMapCorners
/**
* it sets coordinates of the left up and right down corners of the result map
*
* @param Map $resultMap
*/
protected function _setUpResultMapCorners(Map $resultMap)
{
$leftUpCorner = $this->_mapData->getLeftUpCornerPoint();
$resultMap->setLeftUpCorner($leftUpCorner['lon'], $leftUpCorner['lat']);
$rightDownCorner = $this->_mapData->getRightDownCornerPoint();
$resultMap->setRightDownCorner($rightDownCorner['lon'], $rightDownCorner['lat']);
}
示例2: _setUpResultMapCorners
/**
* it sets coordinates of the left up and right down corners of the result map
*
* @param Map $resultMap
*/
protected function _setUpResultMapCorners(Map $resultMap)
{
$centerPoint = $this->_mapData->getCenterPoint();
$centerPointInPixels = $this->_worldMap->getPixelXY($centerPoint['lon'], $centerPoint['lat']);
$leftUpPointInPixels = array('x' => $centerPointInPixels['x'] - round($this->_mapData->getWidth() / 2), 'y' => $centerPointInPixels['y'] - round($this->_mapData->getHeight() / 2));
$resultMap->setLeftUpCorner($this->_worldMap->getLon($leftUpPointInPixels['x']), $this->_worldMap->getLat($leftUpPointInPixels['y']));
$rightDownPointInPixels = array('x' => $centerPointInPixels['x'] + round($this->_mapData->getWidth() / 2), 'y' => $centerPointInPixels['y'] + round($this->_mapData->getHeight() / 2));
$resultMap->setRightDownCorner($this->_worldMap->getLon($rightDownPointInPixels['x']), $this->_worldMap->getLat($rightDownPointInPixels['y']));
}