@Kasun : Yes, You are right. As per the tutorial, Optional parameters are like result_type and location_type used to restrict the no of results. If we used the both parameter, we will get both type of the result. So analyse the requirement, before you going to use these parameters.
result_type : It is used to restrict the result set based on the address type. Can use One or more address types at a single request by using a pipe (|). Those types are following.
1. country,
2. street_address,
3. postal_code
location_type : It is used to restrict results based on the location type. Those types are following.
1. ROOTTOP
2. RANGE_INTERPOLATED
3. GEOMETRIC_CENTER
4. APPROXIMATE
NOTE : For your case ROOTTOP
is enough. And also add street_address
in result_type. keep it in mind - Use API key or Client ID to get the benefit of location_type
.
How do I retrieve address ?
- JSON request to the Google Service by the following.
https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true_or_false&key=API_KEY
Just append a lattitude and longtitude in the above format. Thatz all. You can give a one address at one time. Cant give bulk reverse geocoding(have to achieve it by loop).