当前位置: 首页>>代码示例>>PHP>>正文


PHP Map::getLeftUpCorner方法代码示例

本文整理汇总了PHP中Map::getLeftUpCorner方法的典型用法代码示例。如果您正苦于以下问题:PHP Map::getLeftUpCorner方法的具体用法?PHP Map::getLeftUpCorner怎么用?PHP Map::getLeftUpCorner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Map的用法示例。


在下文中一共展示了Map::getLeftUpCorner方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _calculateScale

 private function _calculateScale()
 {
     $leftUp = $this->_map->getLeftUpCorner();
     $rightDown = $this->_map->getRightDownCorner();
     $lat = abs(($leftUp['lat'] + $rightDown['lat']) / 2);
     return 1 / cos(deg2rad($lat));
 }
开发者ID:pafciu17,项目名称:gsoc-os-static-maps-api,代码行数:7,代码来源:ScaleBar.php

示例2: _getLeftUpCornerForCutingResultMap

 /**
  * get pixel coordinates for cuting result map from temporary one
  *
  * @return array coordinates of the left up corner
  */
 protected function _getLeftUpCornerForCutingResultMap(Map $map)
 {
     $leftUpCornerOfTemporaryMap = $map->getLeftUpCorner();
     $leftUpCornerOfTemporaryMapInPixels = $this->_worldMap->getPixelXY($leftUpCornerOfTemporaryMap['lon'], $leftUpCornerOfTemporaryMap['lat']);
     $leftUpCornerOfResultMap = $this->_mapData->getLeftUpCornerPoint();
     $leftUpCornerOfResultMapInPixels = $this->_worldMap->getPixelXY($leftUpCornerOfResultMap['lon'], $leftUpCornerOfResultMap['lat']);
     return array('x' => $leftUpCornerOfResultMapInPixels['x'] - $leftUpCornerOfTemporaryMapInPixels['x'], 'y' => $leftUpCornerOfResultMapInPixels['y'] - $leftUpCornerOfTemporaryMapInPixels['y']);
 }
开发者ID:pafciu17,项目名称:gsoc-os-static-maps-api,代码行数:13,代码来源:FromBoundaryBox.php

示例3: setData

 public function setData(Map $map)
 {
     $leftUp = $map->getLeftUpCorner();
     $rightDown = $map->getRightDownCorner();
     $this->setLeft($leftUp['lon']);
     $this->setUp($leftUp['lat']);
     $this->setRight($rightDown['lon']);
     $this->setDown($rightDown['lat']);
 }
开发者ID:pafciu17,项目名称:gsoc-os-static-maps-api,代码行数:9,代码来源:BboxRespons.php

示例4: _getLeftUpCornerForCutingResultMap

 /**
  * get pixel coordinates for cuting result map from temporary one
  *
  * @return array coordinates of the left up corner
  */
 protected function _getLeftUpCornerForCutingResultMap(Map $map)
 {
     $leftUpBigMap = $map->getLeftUpCorner();
     $leftUpBigMapInPixels = $this->_worldMap->getPixelXY($leftUpBigMap['lon'], $leftUpBigMap['lat']);
     $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));
     $result = array('x' => $leftUpPointInPixels['x'] - $leftUpBigMapInPixels['x'], 'y' => $leftUpPointInPixels['y'] - $leftUpBigMapInPixels['y']);
     return $result;
 }
开发者ID:pafciu17,项目名称:gsoc-os-static-maps-api,代码行数:15,代码来源:FromCenterPoint.php

示例5: __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());
 }
开发者ID:pafciu17,项目名称:gsoc-os-static-maps-api,代码行数:12,代码来源:LogoMap.php


注:本文中的Map::getLeftUpCorner方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。