PressTigers

Fetch Longitude & Latitude From Address

It is important to understand the significance of adding versatile functionalities into your process of work. Adding the information of longitudes and latitudes of a property can not only help the users refine their choices but also help you endorsing your business at a macro-level. There are options available to develop such plug-ins which can help in generating the information about the Longitudes and Latitudes with Google Maps.

We developed a plugin for our client by which the latitude and longitude of any given address can be fetched by using Google Geocode API. For this purpose, first of all it is required to get the address and concatenate all words with a ‘+‘ sign. Secondly, it is advised not to use space in address. Following this pattern, your address would be something like this:

“1600+Amphitheatre+Parkway,+Mountain+View,+CA”

Now call Google Geocode API and pass this address in parameter.

It will return you an array as shown below:

Now, extract the latitude and longitude from the array.

Google API has two versions, the first one is free which allows you to get latitude and longitude of 2,500 addresses in 24 hours, processing 5 requests per second. In paid version, you use your API key in the parameters and you can get up to 1,00,000 latitude and longitude per day at the rate of 10 requests per second.

In order to use your API key, you can append the API key in parameters as shown below:

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

    Get in Touch