FR: allow lat/lng str instead of float
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?
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: 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:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
- StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.
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.
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.