Answers for "get lat long from zip code in google places api"

0

get lat long from zip code in google places api

function getCoordinates(address){
  fetch("https://maps.googleapis.com/maps/api/geocode/json?address="+address+'&key='+API_KEY)
    .then(response => response.json())
    .then(data => {
      const latitude = data.results.geometry.location.lat;
      const longitude = data.results.geometry.location.lng;
      console.log({latitude, longitude})
    })
}
Posted by: Guest on August-12-2021

Code answers related to "get lat long from zip code in google places api"

Code answers related to "Javascript"

Browse Popular Code Answers by Language