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

[IOS] priceLevel is returned even if not selected in placeFields - possible billing concern #287

Open
chrislarson opened this issue Jun 15, 2020 · 2 comments

Comments

@chrislarson
Copy link

Thank you for the excellent library @tolu360! I'm wondering if this is a possible issue, or if I am doing something incorrectly. Please note that I did have to patch to Places and Maps 3.5.0 before installing for compatibility with react-native-maps.

priceLevel is considered Atmospheric Data by Google, which is billed as a separate SKU, and is very expensive to query. I am seeing priceLevel returned on iOS even if it is not part of the selected fields.

Sample code:

RNGooglePlaces.openAutocompleteModal({}, ['name', 'placeID', 'location', 'viewport'])
      .then((place) => {
        console.log(place);
      })
      .catch((error) => console.log(error.message)); 

Sample response (iOS):

{ 
  priceLevel: -1, 
  placeID: "ChIJeZZK0S93j4AROMShF38vsEQ", 
  viewport: {…}, 
  location: {…}, 
  name: "Pacifica"
}
@chrislarson
Copy link
Author

I could be mistaken here. Is (-1) a default value always returned for priceLevel on iOS if it is not part of the original query?

@chrislarson chrislarson changed the title [IOS] priceLevel is returned even if not selected in placeFields - billing concern [IOS] priceLevel is returned even if not selected in placeFields - possible billing concern Jun 15, 2020
@tolu360
Copy link
Owner

tolu360 commented Jun 15, 2020

Without checking the docs for confirmation, I would go out on a limb to say that may be the default on iOS when it is not included in the selected fields - however, let me confirm and get back to this later.

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