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

Places API returns different result when using type #80

Closed
jack-hoang opened this issue Apr 7, 2017 · 1 comment
Closed

Places API returns different result when using type #80

jack-hoang opened this issue Apr 7, 2017 · 1 comment

Comments

@jack-hoang
Copy link

jack-hoang commented Apr 7, 2017

When type: 'restaurant' is added to the query, the result is completely different.

For example

client.places({
        query: 'Helena\'s',
        language: 'en',
        location: [21.4389123,-158.0000565],
        radius: 5000
})

returns (some fields removed for clarity):

{
     formatted_address: '1240 N School St, Honolulu, HI 96817, United States',
     geometry:
      { location: { lat: 21.3309439, lng: -157.8650871 },
     id: 'cd54478b5f6e13b50b181dda17b6201b4c190ba0',
     name: 'Helena\'s Hawaiian Food',
     place_id: 'ChIJ-aNpcIduAHwRlVpxYVxnvxs',
     types: [ 'restaurant', 'food', 'point_of_interest', 'establishment' ]
}

Whereas

client.places({
        query: 'Helena\'s',
        language: 'en',
        location: [21.4389123,-158.0000565],
        radius: 5000,
        type: 'restaurant'
})

returns:

{
      formatted_address: '95-1840 Meheula Pkwy, Mililani, HI 96789, United States',
      geometry:
       { location: { lat: 21.4680956, lng: -158.0023998 },
      id: 'ad5b2180a1119d6be0005f51eb8111116ca03769',
      name: 'Mililani Mauka Chinese Cuisine',
      place_id: 'ChIJVQGveXZnAHwRnvJ_xnrSS5w',
      types: [ 'restaurant', 'food', 'point_of_interest', 'establishment' ]
}

If using type: 'food', it correctly returns "Helena's Hawaiian Food"

Thanks

@stephenmcd
Copy link
Contributor

Since that seems to be an API issue (rather than this client library) I'd suggest opening an issue in the PlacesAPI issue tracker: https://issuetracker.google.com/savedsearches/558482

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