sourcetoad / bytey
A library for encoding Google Map's Encoded Polyline.
Installs: 895
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 0
Open Issues: 0
pkg:composer/sourcetoad/bytey
Requires
- php: ^8.2||^8.3||^8.4
Requires (Dev)
- laravel/pint: ^1.19
- phpunit/phpunit: ^11
This package is auto-updated.
Last update: 2025-09-25 14:31:01 UTC
README
A simple implementation of Google's Polyline Encoding algorithm in PHP.
Install
This package is currently supporting PHP 8.2 and above.
composer require sourcetoad/bytey
Documentation
Encoding
use Sourcetoad\Bytey; $points = [ [38.5, -120.2], [40.7, -120.95], [43.252, -126.453] ]; $encoded = Bytey::googlePolylineEncode($points); // Outputs "_p~iF~ps|U_ulLnnqC_mqNvxq`@"