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

FR: allow lat/lng str instead of float #503

Open
dotysan opened this issue Sep 26, 2023 · 3 comments
Open

FR: allow lat/lng str instead of float #503

dotysan opened this issue Sep 26, 2023 · 3 comments
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@dotysan
Copy link

dotysan commented Sep 26, 2023

Is your feature request related to a problem? Please describe.
A multi-location elevation() request throws an err when the locs are a list of lat/lng strings.

Describe the solution you'd like
I would have expected this to work.

locations = [('40.714728', '-73.998672'), ('-34.397', '150.644')]
results = client.elevation(locations)

Since I'm retrieving them from json text and googlemaps eventually returns them as json text, why require manual/interim conversion to floats?

Additional context
It appears this might be due to the polyline encoding. But still...why is that mandatory for small lists of coords?

@dotysan dotysan added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 26, 2023
@wangela
Copy link
Member

wangela commented Sep 26, 2023

If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.

@dotysan Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

@dotysan
Copy link
Author

dotysan commented Sep 26, 2023

Thx @wangela, the workaround (float(lat), float(lng)) is simple enough. But still seems unnecessary for my needs since (lat, lng) is already a valid tuple of str coords. Although I could be missing something.

@dotysan
Copy link
Author

dotysan commented Sep 26, 2023

Also, in my example lat/lng are already formatted strings that represent the precision. After float() that is lost. And I now have to re-format the float back to the proper precision string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants