Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding "score" and "importance" fields from opendatafrance and openstreetmap providers #228

Open
XavDmz opened this issue Sep 7, 2017 · 2 comments

Comments

@XavDmz
Copy link

XavDmz commented Sep 7, 2017

Hello,

A project i'm working on, using node-geocoder to access "adresse.data.gouv.fr" and Open Street Map's geocoding services, requires to get the scoring/confidence field returned by these services.

I modified the '_geocode' function for these providers to return add this value to the formated result, and updated the tests to take this into account. 'npm test' and 'npm run lint' are happy.

I'm wondering, before initiating a pull request :

  • does this kind of modification suits you ?
  • if not, should I :
    • implement it another way (as extras, in the '_formatResult' function used by both '_geocode' and '_reverse') ?
    • keep it in a fork without merging it in this repository ?

Have a nice day.

@nchaulet
Copy link
Owner

nchaulet commented Oct 6, 2017

The goal of this library is to provide a standardized abstraction for a lot of geocoder APIs.
I am not sure the score is something that could be generic for all providers.

It could maybe be implemented as an extra property.

@XavDmz
Copy link
Author

XavDmz commented Oct 10, 2017

I agree, this score property isn't generic at all.
I will move it as an extra in my fork, and when everything is good I will try a pull request.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants