myzend / geolocation
此包最新版本(0.9.3.2)没有可用的许可证信息。
MyZend Geolocation处理Google Maps API以解析地址。
0.9.3.2
2013-08-13 17:22 UTC
Requires
- php: >=5.3.3
- doctrine/doctrine-mongo-odm-module: *@stable
- myzend/core: 0.*
- zendframework/zendframework: 2.*@stable
This package is not auto-updated.
Last update: 2024-09-24 06:12:05 UTC
README
版本 0.9
构建状态
简介
MyZend Geolocation是一个使用Google Maps API解析地址的ZF2模块。
使用MongoDB来保存位置。
您可以从您的任何实体中添加此对象的引用。
/** @ODM\ReferenceOne(targetDocument="Geolocation\Document\Geolocation") */
protected $geolocation;
示例
/**
* Basic usage
*/
$googleMapsHelper = new Geolocation\Document\GoogleMapsHelper($this->getServiceManager());
$googleMapsHelper->forwardSearch("La Rambla, s/n, Barcelona");
if ($googleMapsHelper->getStatus() == $googleMapsHelper::OK) {
var_dump($googleMapsHelper->getGeoData());
}
/**
* Document resolve creation
*/
$geolocationHelper = new Geolocation\Document\GeolocationHelper($this->getServiceManager());
$geolocationDocument = $geolocationHelper->lookupGeolocation("Brixton Academy, London");