dev-master
9999999-devAnonymation Google Maps bundle
MIT
The Requires
google map google-maps
Anonymation Google Maps bundle
Provides abstraction of Google Maps API WS., (*1)
For now, only GeocodeAPI service is implemented. Other implementations and documentation will come later., (*2)
use Ano\Bundle\GoogleMapsBundle\Service\GeocodeAPIQuery; // ... $geocode = new GeocodeAPIQuery(array( 'address' => '13 bis avenue de la Motte Picquet 75007 PARIS', 'sensor' => 'false', )); $result = $geocode->getResult(); // $address = $result->getAddress(); // $address->getFormattedAddress(); // $address->getStreetNumber(); // $address->getStreetName(); // $address->getZipCode(); // ... // $geometry = $result->getGeometry(); // $geometry->getLatitude(); // $geometry->getLongitude();
<property name="address"> <constraint name="Ano\Bundle\GoogleMapsBundle\Validator\Constraints\Address"> <option name="invalidAddressMessage">address.InvalidAddress</option> <option name="notSpecificEnoughMessage">address.NotSpecificEnough</option> </constraint> </property>
Anonymation Google Maps bundle
MIT
google map google-maps