承接 richarddobron/google-maps-data-parameter-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

richarddobron/google-maps-data-parameter-parser

Composer 安装命令:

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

包简介

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

README 文档

README

ℹ️ 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

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.

https://www.google.co.uk/maps/dir/Bonn,+Germany/Berlin,+Germany/@51.6456171,7.9144552,7z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x47bee19f7ccbda49:0x86dbf8c6685c9617!2m2!1d7.0982068!2d50.73743!1m5!1m1!1s0x47a84e373f035901:0x42120465b5e3b70!2m2!1d13.404954!2d52.5200066?hl=en

✨ 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

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

PHP 7.0 or higher

📦 Installing

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

⚡️ Usage

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

{
    "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

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

🧪 Testing

$ composer tests

🤝 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

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

richarddobron/google-maps-data-parameter-parser 适用场景与选型建议

richarddobron/google-maps-data-parameter-parser 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.44k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2023 年 12 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 richarddobron/google-maps-data-parameter-parser 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 richarddobron/google-maps-data-parameter-parser 我们能提供哪些服务?
定制开发 / 二次开发

基于 richarddobron/google-maps-data-parameter-parser 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-28