10/06
2017
Wallogit.com
2017 © Pedro Peláez
Geocode
, (*2)
Geocoding is the process of converting addresses, place names, or other location identifiers into geographic coordinates (latitude and longitude). This essential functionality enables various applications and services to accurately locate and visualize locations on a map., (*3)
Your application's API key. This key identifies your application for purposes of quota management. Learn how to get a key., (*5)
composer require davidvandertuijn/geocode
use Davidvandertuijn\Geocode;
Request, (*6)
$geocode = new Geocode();
$geocode->setApiKey(''); // Your application's API key.
$geocode->setAddress('Westblaak 180, 3012 KN, Rotterdam, NL');
if ($geocode->request()) {
$latitude = $geocode->getLatitude(); // 51.9163212
$longitude = $geocode->getLongitude(); // 4.475754
}