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

New places api #943

Merged
merged 10 commits into from
Oct 4, 2024
Merged

New places api #943

merged 10 commits into from
Oct 4, 2024

Conversation

rojiphil
Copy link
Contributor

@rojiphil rojiphil commented Aug 8, 2024

@FaridSafi Coming from this issue, this PR attempt to support Autocomplete (New) and Place Details (New) API. Also, this PR adds sessionToken support.

@FaridSafi
Copy link
Owner

Awaiting your confirmation to proceed with the merge

GooglePlacesAutocomplete.js Outdated Show resolved Hide resolved
Copy link

@rafecolton rafecolton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more changes are required to make this work with the new BE changes to support locationBias

GooglePlacesAutocomplete.js Outdated Show resolved Hide resolved
GooglePlacesAutocomplete.js Outdated Show resolved Hide resolved
@rojiphil rojiphil marked this pull request as ready for review October 3, 2024 13:16
@rojiphil
Copy link
Contributor Author

rojiphil commented Oct 3, 2024

Awaiting your confirmation to proceed with the merge

@FaridSafi @rafecolton The PR here is ready for review as it works well with the new places API.

@rojiphil rojiphil requested a review from rafecolton October 3, 2024 13:57
@FaridSafi FaridSafi merged commit 313ccf8 into FaridSafi:master Oct 4, 2024
@FaridSafi
Copy link
Owner

Thank you @rojiphil, merged and deployed. Could you please double check if the published version is OK ?


request.withCredentials = requestShouldUseWithCredentials();
setRequestHeaders(request, getRequestHeaders(props.requestUrl));

request.send();
if (props.isNewPlacesAPI) {
const { key, locationbias, types, ...rest } = props.query;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to maintain locaitonbias in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locationbias is for old Places API and can be stripped whereas locationBias is what is expected in new Places API. We maintain locationBias for new Places API.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah got it, thank you for explaining 👍

@rafecolton
Copy link

Thanks @FaridSafi! I see the version published on NPM

@rojiphil rojiphil mentioned this pull request Oct 7, 2024
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

Successfully merging this pull request may close these issues.

3 participants