Please Note: Blog posts are not selected, edited or screened by Seeking Alpha editors.

Geocoding Google Map API

Geocoding is the method of finding the longitude and latitude of a granted address or location. The Google Map service devotes developers and world broad web location proprietors free get access to to their geocoder, both utilising the Google Map JavaScript API, as well as utilising the world broad web service. In this item I will display you how to get access to the geocoder world broad web service utilising PHP in order that it can be utilized in your own applications.

There are numerous submissions for a geocoder and having get access to to a free, dependable and often revised geocoder is a gigantic assist in world broad web submission development.


Some demonstrations of where a geocoder can be helpful include:

  • Plotting a user-submitted address on a chart (such as a house proprietor records their dwelling on a genuine land parcel world broad web site).
  • Discovering the longitude and latitude so computed outcomes can be presented (such as a finding other groups of coordinates inside a granted distance).
  • Verifying locations before boats instructions from your ecommerce store.
  • Retrieving the correctly formatted address string for the granted location. This is very helpful when you address how inconsistent users can be when going into their address.


When utilising Google Map to brandish charts on your world broad web location, it is so straightforward to get access to the JavaScript founded geocoder, although this isn't habitually an ample answer, particularly when it arrives to accessibility. For demonstration, if your submission keeps coordinates founded on a user-submitted address utilising the JavaScript geocoder, then this answer will not work for users who have JavaScript disabled. To overwhelm this we can use the world broad web service rather than, significance all demands to the geocoder are presented on the server side. In this item we will evolve some PHP 5 categories that will make it so straightforward to query the geocoder and get access to the response.


Beginning with Google Map

While we are not expressly considering with the brandish of charts on our world broad web sites in this item, we still require to be well renowned with the Google Map API.

The first thing that you should manage is to conceive an API key for your world broad web site. This is utilized to recognise all demands to the API. You can obtain a free key by acquiescing to the periods and going into your world broad web location URL.

At time of composing this item, the restrict on geocoder demands is 15,000 per day, which will confidently be adequate for your needs. As cited subsequent in this item, you are boosted to cache geocoder facts and numbers in your own submission while possible.

Once you have an API key then you are adept to get access to the geocoder
Google Map
Windows XP boot disk