davidvandertuijn / geocode
Geocode
Installs: 2 453
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1.0
README
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.
Register an API Key
Your application's API key. This key identifies your application for purposes of quota management. Learn how to get a key.
Install
composer require davidvandertuijn/geocode
Usage
use Davidvandertuijn\Geocode;
Request
$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 }