salavert / open-location-code
PHP port of Google Open Location Codes.
Installs: 7 559
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 5
Open Issues: 2
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: ~4.6
This package is not auto-updated.
Last update: 2022-10-09 08:37:34 UTC
README
PHP port of Google Open Location Codes.
Open Location Codes are short, generated codes that can be used like street addresses, for places where street addresses don't exist.
Open Location Codes were developed at Google's Zurich engineering office, and then open sourced so that they can be freely used.
Usage
Encode latitude and longitude to obtain a code
$latitude = 51.3701125; $longitude = -1.217765625; $olc = new OpenLocationCodes(); $openLocationCode = $olc->encode($latitude, $longitude); // Will return 9C3W9QCJ+2V
Installation
Update your composer.json
"require": { "salavert/open-location-code": "1.*" }
or use composer's require command:
composer require salavert/open-location-code:1.*