0
votes

I am using google map. I want to search for ATM,bank,hospital many more on map by zip code. Current code shows all but for some zip codes it's not showing correct location . I am using following library https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places.

 var address=""+zaddress+"";

    var geocoder = new google.maps.Geocoder();
    geocoder.geocode({ 'address': address}, function(results, status) {
      .
      .
      .
    }
1

1 Answers

2
votes

Try concatenating the country at the end of address string: address + ", Brazil" , for example (see How to prevent google geocoder from returning results from other countries). Also, there is the components=country:[COUNTRY CODE] property you could try.