DotNet/Answer Detail

how to bind district and state through pincode via google api

Shivam
Shivam
2 Points
1 Posts

I want to bind automatically state and district on entering the pin code of that city. how can i do this by using google API.

Total Answered: 1
Total Marked As Answer: 0
Posted On: 01-Mar-2018 03:35

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Moderator
1152 Points
211 Posts
     

Hi Shivam,

Follow the following google doc link https://developers.google.com/maps/documentation/javascript/geocoding  

You can use, 2,500 free requests per day, calculated as the sum of client-side and server-side queries; and If you want more you will need to enable billing and will paid for that.

See javascript code for getting location from zipocde/pincode 

function codeAddress() {
geocoder.geocode({
  componentRestrictions: {
    country: 'AU',
    postalCode: '2000'
  }
}, function(results, status) {
  if (status == 'OK') {
    var location = results[0].geometry.location;
    
  } else {
    window.alert('Geocode was not successful for the following reason: ' + status);
  }
});
}
Posted On: 04-Mar-2018 01:32

Blog

Active User (2)

 Log In to Chat