iseed838/photon-api
Composer 安装命令:
composer require iseed838/photon-api
包简介
Project Photon-api wrapper
README 文档
README
Project Photon-api wrapper
Project wrapper of api requests for photon project https://photon.komoot.de/
Allows you to perform a fully contextual search by text template and reverse search by coordinates
- To install with composer try:
composer require iseed838/photon-api "~0.1"
- Make query request
$client = new \Photon\Models\PhotonClient(new \GuzzleHttp\Client()); $request = new \Photon\Models\PhotonQueryRequest([ 'query' => "Moscow Valilova 6", ]); $response = $client->query($request);
- Make reverse request
$client = new \Photon\Models\PhotonClient(new \GuzzleHttp\Client()); $request = new \Photon\Models\PhotonReverseRequest( [ 'latitude' => 55.630358, 'longitude' => 37.516776, ]); $response = $client->reverse($request);
The result returns an array containing the limit of response objects
[0] => Photon\Models\PhotonResponse Object ( [osm_id] => 537247988 [osm_type] => W [extent] => Array ( [0] => 37.516021 [1] => 55.6309387 [2] => 37.5177537 [3] => 55.6299123 ) [osm_key] => building [osm_value] => retail [postcode] => 117632 [countrycode] => [country] => Russia [state] => Moscow [city] => Konkovo District [street] => Profsous street [housenumber] => 126 c3 [latitude] => 55.63039825 [longitude] => 37.516796697274 [type] => Point )
Query request properties
- query (string|required) Text query
- longitude (int|float|null) Additional box coordinate;
- latitude (int|float|null) Additional box coordinate;
- language (required|string) Response language. Default is en. May accept en,de,ft,it
- limit (required|int) Response count/ Default is 5
- osm_tag (string|null) Additional filter to osm_tag
Reverse request properties
- longitude (required|int|float) Address coordinate;
- latitude (required|int|float) Address coordinate;
- language (required|string) Response language. Default is en. May accept en,de,ft,it
- limit (required|int) Response count/ Default is 5
iseed838/photon-api 适用场景与选型建议
iseed838/photon-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 163 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 12 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「photon」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 iseed838/photon-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iseed838/photon-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 iseed838/photon-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Collections of small tools for MongoDB.
Views helper to create REST APIs with JSON and CORS
Authentification and users for MongoDB
Wrapper for the swiftmailer library
A PSR-7 PHP package for working with the Particle API
统计信息
- 总下载量: 163
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-19