Download the PHP package kotenarok/open-location-code without Composer
On this page you can find all versions of the php package kotenarok/open-location-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kotenarok/open-location-code
More information about kotenarok/open-location-code
Files in kotenarok/open-location-code
Package open-location-code
Short Description Open location code for php
License MIT
Informations about the package open-location-code
Open location code for php
Open Location Codes are a way of encoding location into a form that is easier to use than latitude and longitude.
They are designed to be used as a replacement for street addresses, especially in places where buildings aren't numbered or > streets aren't named.
Open Location Codes represent an area, not a point. As digits are added to a code, the area shrinks, so a long code is more accurate than a short code.
A location can be converted into a code, and a code can be converted back to a location completely offline.
Based on javascript version from this repo.
Usage
Install via composer:
Examples:
Method OpenLocationCode::decode returns array with following keys:
- latitudeLo, longitudeLo - the coordinates of the lower left corner of the square
- latitudeHi, longitudeHi - the coordinates of the top right corner of the square
- codeLength - decoded length
