geocoder-php / geocoder-php/Geocoder

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

Aperta
#942 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature request provider
Lingua principale
PHP
Stelle
4k
Fork
525
Merge medio
8m
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Esamina l’interfaccia del provider e gli entry point di GoogleMapsProvider e NominatimProvider indicati nell’issue. Confronta i flussi esistenti di reverse lookup con le API di lookup tramite ID dei provider, quindi determina le modifiche necessarie all’interfaccia e a location/query; il lavoro è completo quando entrambi i provider supportano il lookup tramite un ID memorizzato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.