nchaulet / node-geocoder

nodejs geocoding library
http://nchaulet.github.io/node-geocoder/
MIT License
928 stars 214 forks source link

OpenStreetMap : suburb field #283

Closed Roshdy closed 4 years ago

Roshdy commented 4 years ago

At first: Thanks for the great package.

I need to access the suburb field from the results coming from openstreetmap, as this is the field holding the area name in some countries. (i.e. Egypt)

I have two suggestions:

  1. Just add the field to results set (vote down)
  2. Add _raw object to result set, which should return the raw result from provider (vote up)

Obviously option 2 is reusable for other providers. Which would modify the Entry type to have extra _raw : object

I can submit a PR for either one. Please let me know which path would you recommend

Roshdy commented 4 years ago

I just figured out that i can have custom formatter with _raw data, which is exactly what i need. I'm closing this one and leaving it for reference.