0
votes

I tried to search for an address through a Geocoder google API but I could not find it.

Address trying to look for: 29 Esplanade, St Helier JE2 3QA, Jersey, UK

Please see the formed URL as below which is not working: https://maps.googleapis.com/maps/api/geocode/xml?address=29+Esplanade%2c+St+Helier+JE2+3QA%2c+Jersey%2c+UK&sensor=false&new_forward_geocoder=true&region=UK&client=client_Id&channel=channel_ID&components=country%3aUK&signature=signature

Above mentioned URL is not working with business account. I've not mentioned Clint Id, signature & Channel Id in above URL.

I also tried to search the same address without business account and it works. Url: https://maps.googleapis.com/maps/api/geocode/xml?address=29+esplanade+st+helier The above mentioned URL works fine.

Would you please provide some options? What is wrong in my approach? Please let me know if you need any more details from me to resolve this.

Thanks in advance.

2

2 Answers

1
votes

The address "29 Esplanade, St Helier JE2 3QA, Jersey, UK" is not part of United Kingdom (Jersey is not part of the United Kingdom), and as you are applying filter for country:UK is not displaying address.

1) Change the component query from country:UK to country:JE

2) regenerate signature and replace signature with new one.

https://maps.googleapis.com/maps/api/geocode/xml?address=29+Esplanade%2c+St+Helier+JE2+3QA%2c+Jersey%2c+UK&sensor=false&new_forward_geocoder=true&region=UK&client=client_Id&channel=channel_ID&components=country%3aJE&signature=signature

Note: You can also remove the The component filters query from url. The component filters will fully restrict the result from geocoder. and the region will not fully restrict the result. you can find it on google here

0
votes

I got new solution for restriction of address for multiple countries and regions.

here we can update our component query in our geocoder url like

https://maps.googleapis.com/maps/api/geocode/xml?address=29+esplanade+st+helier&sensor=false&new_forward_geocoder=true&region=UK&client=client_Id&channel=chenal_ID&components=country%3aUK%7ccountry%3aJE&signature=signature

Hence , we can search our address in these bounded countries and regions.

Thank you.

Cheers!