2017 © Pedro Peláez
 

library open-location-code

Open location code for php

image

bogdaan/open-location-code

Open location code for php

  • Saturday, February 3, 2018
  • by Bogdan
  • Repository
  • 1 Watchers
  • 1 Stars
  • 395 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Build
Status, (*1)

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., (*2)

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., (*3)

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., (*4)

A location can be converted into a code, and a code can be converted back to a location completely offline., (*5)

Based on javascript version from this repo., (*6)

Usage

Install via composer:, (*7)

$ composer require bogdaan/open-location-code

Examples:, (*8)


use OpenLocationCode\OpenLocationCode; // encode var_dump(OpenLocationCode::encode(48.41, 34.81)); // decode (return area array) var_dump(OpenLocationCode::decode("44870000+"));

Method OpenLocationCode::decode returns array with following keys:, (*9)

  • 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

Links

The Versions

03/02 2018

dev-develop

dev-develop

Open location code for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

olc plus.codes open location code

03/02 2018

dev-master

9999999-dev

Open location code for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

olc plus.codes open location code