geocoder-php / geocoder-php/Geocoder
[Feature Request] Lookup by id (GoogleMapsProvider, Nominatim)
Personne n'a encore pris cette issue.
- Langage dominant
- PHP
- Étoiles
- 4k
- Forks
- 525
- Merge moyen
- 8 min
- PR mergées (30 j)
- 1
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Examinez l’interface du provider ainsi que les points d’entrée de GoogleMapsProvider et NominatimProvider mentionnés dans l’issue. Comparez leurs flux existants de recherche inversée avec les API de recherche par ID des providers, puis déterminez les modifications nécessaires au niveau de l’interface et de location/query ; le travail est terminé lorsque les deux providers prennent en charge la recherche à partir d’un ID stocké.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- php
- Domaine
- api, backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100