Reverse Geocoding get address from latitude and longitude

  • March 25, 2021
  • Blog

fd

Reverse geocoding is the process to convert the latitude and longitude coordinates to a readable address.

Initialize google API key here, Please make sure you set  billing information for google API else it will error out
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AddKeysHere&callback=initMap"></script>

Call this script 
 <script type="text/javascript">
function artificersusaGetAddress(lat, lng)
{
 var latlng = new google.maps.LatLng(lat, lng);
 var geocoder = geocoder = new google.maps.Geocoder();
  geocoder.geocode({ 'latLng': latlng }, function (results, status) 
  {
    if (status == google.maps.GeocoderStatus.OK)
    {
  
    if (results[1])
      {
        var Address = results[1].formatted_address;
      }

     }
  }
 });
}

About us and this blog

We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.

Request a free quote

We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.

Subscribe to our newsletter!

More from our blog

See all posts
No Comments

Leave a Comment