myzend/geolocation

此包最新版本(0.9.3.2)没有可用的许可证信息。

MyZend Geolocation处理Google Maps API以解析地址。

安装: 90

依赖: 0

建议: 0

安全: 0

星星: 5

关注者: 3

分支: 1

开放问题: 0

类型:zf2-module

0.9.3.2 2013-08-13 17:22 UTC

This package is not auto-updated.

Last update: 2024-09-24 06:12:05 UTC


README

版本 0.9

构建状态

Build Status

简介

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");