PHPackages                             richarddobron/google-maps-data-parameter-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. richarddobron/google-maps-data-parameter-parser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

richarddobron/google-maps-data-parameter-parser
===============================================

PHP parser and builder for the "data" parameter (Protocol Buffers) in Google Maps URLs

v1.0.1(1y ago)72.6k1MITPHPPHP ^7.0 || ^8.0CI passing

Since Dec 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/richardDobron/google-maps-data-parameter-parser)[ Packagist](https://packagist.org/packages/richarddobron/google-maps-data-parameter-parser)[ RSS](/packages/richarddobron-google-maps-data-parameter-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

🌍 Google Maps 'data' Parameter Parser and Builder
=================================================

[](#-google-maps-data-parameter-parser-and-builder)

ℹ️ Overview
-----------

[](#ℹ️-overview)

This PHP library provides a convenient way to parse and build the 'data' parameter in Google Maps URLs, specifically the Protocol Buffer implementation. It helps extract meaningful information from the encoded 'data' parameter and allows for the construction of new 'data' parameters for Google Maps URLs.

🔗 Background
------------

[](#-background)

Google Maps directions URLs often contain a 'data' parameter that encodes various details, such as coordinates, waypoints, and travel modes. This library focuses on the extraction and construction of this 'data' parameter, making it easier for developers to work with Google Maps URLs programmatically.

✨ How it Works
--------------

[](#-how-it-works)

The 'data' parameter consists of elements separated by ! marks. Each element includes an integer id, a single character alphabetic type, and a string value. The interpretation of each element depends on its properties and position in the tree structure.

🛠️ Functionality
----------------

[](#️-functionality)

The parser extracts the 'data' parameter and organizes it into a tree of nodes, each representing a specific element in the Protocol Buffer. This structure allows developers to easily navigate and access the encoded information.

📖 Requirements
--------------

[](#-requirements)

PHP 7.0 or higher

📦 Installing
------------

[](#-installing)

```
$ composer require richarddobron/google-maps-data-parameter-parser
```

⚡️ Usage
--------

[](#️-usage)

### Parser

[](#parser)

```
$data = \dobron\GoogleMapsQueryArgs::decode('!3m1!4b1!4m13!4m12!1m5!1m1!1s0x47bee19f7ccbda49:0x86dbf8c6685c9617!2m2!1d7.0982068!2d50.73743!1m5!1m1!1s0x47a84e373f035901:0x42120465b5e3b70!2m2!1d13.404954!2d52.5200066');
```

### Example Output

[](#example-output)

```
{
    "3": {
        "4": "b1"
    },
    "4": {
        "4": {
            "1": [
                {
                    "1": {
                        "1": "s0x47bee19f7ccbda49:0x86dbf8c6685c9617"
                    },
                    "2": {
                        "1": "d7.0982068",
                        "2": "d50.73743"
                    }
                },
                {
                    "1": {
                        "1": "s0x47a84e373f035901:0x42120465b5e3b70"
                    },
                    "2": {
                        "1": "d13.404954",
                        "2": "d52.5200066"
                    }
                }
            ]
        }
    }
}
```

### Builder

[](#builder)

```
$protocolBuffer = \dobron\GoogleMapsQueryArgs::encode($data);
```

🧪 Testing
---------

[](#-testing)

```
$ composer tests
```

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! If you'd like to help improve this project, feel free to open an issue or submit a pull request.

📜 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance45

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~381 days

Total

2

Last Release

491d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ce70053083f807f4416f0bafe680691b66cd14f3c1bdf7b3df51b6f5b5cfdea?d=identicon)[dobron](/maintainers/dobron)

---

Top Contributors

[![richardDobron](https://avatars.githubusercontent.com/u/33115305?v=4)](https://github.com/richardDobron "richardDobron (3 commits)")

---

Tags

google-mapsweb-scraper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/richarddobron-google-maps-data-parameter-parser/health.svg)

```
[![Health](https://phpackages.com/badges/richarddobron-google-maps-data-parameter-parser/health.svg)](https://phpackages.com/packages/richarddobron-google-maps-data-parameter-parser)
```

###  Alternatives

[zepgram/module-multi-threading

This module is a powerful tool for developers who want to process large data sets in a short amount of time

8122.2k](/packages/zepgram-module-multi-threading)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
