geocoder-php / geocoder-php/Geocoder

limit results geocoder

未关闭
#1,224 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

question
主要语言
PHP
星标
4k
派生
525
平均合并
8 分钟
30 天内合并 PR
1

描述

Hi, i've this code

$httpClient = new \GuzzleHttp\Client(); $provider = new \Geocoder\Provider\GoogleMaps\GoogleMaps($httpClient, null, env('GOOGLE_MAPS_API_KEY')); $geocoder = new \Geocoder\StatefulGeocoder($provider, 'it'); $result = $geocoder->reverseQuery(ReverseQuery::fromCoordinates($latitude, $longitude));

if I try to add ->limit(10) before ->reverseQuery it returns error "message": "Call to undefined method Geocoder\StatefulGeocoder::limit()",

i.e. $result = $geocoder->limit(10)->reverseQuery(ReverseQuery::fromCoordinates($latitude, $longitude)); returns this error, how can I fix it?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查示例中使用的 StatefulGeocoder、GoogleMaps provider 和 ReverseQuery 入口点,并查看结果限制是如何表示的。当确定并演示了受支持的限制反向地理编码结果的方式,或明确界定了缺失能力的范围时,该 issue 即完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
php
领域
api, backend
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。