[Feature Request] Lookup by id (GoogleMapsProvider, Nominatim)

オープン
#942 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
php
領域
api, backend

調査の方向性

provider interface と、issue で指定されている GoogleMapsProvider および NominatimProvider のエントリーポイントを確認します。既存の reverse lookup フローを各 provider の ID lookup API と比較し、そのうえで必要な interface および location/query の変更を判断します。両方の provider が保存済み ID による lookup をサポートすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

feature request provider

First of all, thanks for this great php package!

I have a feature request for getting address information by id instead of doing a full search again. I think many applications will store part of the geocoding response and eventually will re-fetch information for the stored part.

At the moment, with GoogleMapsProvider and NominatimProvider you can only do a reverse lookup by lat/lng or re-do the query. However both of the endpoints have a dedicated API for lookup (for google maps this even is the preferred way, because it will not count as a request as far as I know).

For OpenStreetMap it looks like this: https://nominatim.openstreetmap.org/lookup?osm_ids=NXXXXX.

It would be great if the providers would have a lookup method for this.
An even better solution would be to extend the provider Interface (or have a 2nd interface "LookupAwareProvider" with a lookup action or the GeocodeQuery object with an id property and maybe also the Location interface.

If a provider defines an id for a location, it could be used for a lookup call.

I know, that I can easily achieve this by creating my own provider, however, if this feature is interesting for you, we could discus an solution and I could provide a PR for this.

主要言語
PHP
スター
4k
フォーク
525
平均マージ
8分
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

geocoder-php/Geocoder のほかの issue

geocoder-php/Geocoder の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。