myzend / geolocation
MyZend Geolocation handles Google Maps API to resolve addresses.
Installs: 92
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 0
Type:zf2-module
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: 2025-01-28 07:44:29 UTC
README
Version 0.9
Build status:
Introduction
MyZend Geolocation is a ZF2 module to resolve an address using Google Maps API.
Uses MongoDB to save the locations.
You could add a reference of this objects from any of your entities.
/** @ODM\ReferenceOne(targetDocument="Geolocation\Document\Geolocation") */
protected $geolocation;
Examples
/**
* 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");