mfeldheim/map-stuff
Composer 安装命令:
composer require mfeldheim/map-stuff
包简介
Stuff related to maps
README 文档
README
stuff related to maps
Class \Geo\Coder
Client to receive coordinates from a webservice. Plugins implemented:
- Y!Boss (Yahoo)
- Nominatim (OSM)
Usage
use Geo\Coder\Plugin;
$geocoder = new \Geo\Coder(
new Nominatim( array(
'requestURI' => 'http://nominatim.openstreetmap.org/search',
'i118n' => 'en'
))
);
$result = self::$geocoder->fetchCoords(
'Muellerstr. 40, 80469 München',
Coder::PRECISION_HIGH
);
$result->getLat();
$result->getLon();
// etc.
Class \Geo\Projection
degreesToPixels lat/lng to pixels on a map
Usage
$mapProjection = new \Geo\Projection();
$pixelCoordinates = $mapProjection->degreesToPixels( $latitude, $longitude, $mapWidth, $mapHeight );
Example file examples/drawPointsOnMap.php
# composer install
php drawPointsOnMap.php
requires
- php >= 5.3.2
- php-gd (optionally compiled with freetype support)
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2013-11-06