googlemaps / google-maps-services-go

Go client library for Google Maps API Web Services
https://pkg.go.dev/googlemaps.github.io/maps
Apache License 2.0
737 stars 214 forks source link

Need extra "new line character" for few postalcodes to geolocate them #289

Open vikrantdheer-ebsco opened 11 months ago

vikrantdheer-ebsco commented 11 months ago

If I hit Google geocoding api with below URL

https://**maps.googleapis.com/maps/api/geocode/json**?key=**{api_key}**&address=**OSLO**&components=**country:NO%7Cpostal_code:N-0302**

I am unable to get the results

But if I append "newline character" after postal code like this %0A, it works see below url?

https://maps.googleapis.com/maps/api/geocode/json?key=**{api_key}**&address=**OSLO**&components=**country:NO%7Cpostal_code:N-0302%0A**

Although this is not the case for US as country, if I search 5 digit postal code without any newline character it works

wangela commented 11 months ago

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.

@vikrantdheer-ebsco 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.