Showing posts with label address to latitude. Show all posts
Showing posts with label address to latitude. Show all posts

Tuesday, June 12, 2012

UK Post codes to latitude - longitude

Hi folks,

Apart from the conventional Google API for retrieving the latitude and longitude of any location by:

http://maps.googleapis.com/maps/api/geocode/json?address=<Address>&sensor=false

The above works quit beautifully for me. But the only problem was with its daily query limit. That is, you cannot make more than one particular number of calls to the above API from a single IP address.

So I started researching on other available API's for generating lat/lon from a given post code/city/town. Since my requirement was just for UK, so the following API URL came in very handy to me:

Tuesday, February 22, 2011

Address to Latitude / Longitude


In PHP you can easily find the latitude and longitude of a particular address, which is in simple text format. All you have to do is to copy and paste the code which is provided at the end of this post. In this the address is converted by the use of a google API.

Now for that first you need to get a registered API key. You can signup for the API key here.

Paste the following code in your .php file and execute: