Answers for "how to get location name from latitude and longitude"

PHP
0

getCityNameByLatitudeLongitude

const fetchLocationName = async (lat,lng) => {
    await fetch(
      'https://www.mapquestapi.com/geocoding/v1/reverse?key=G1moSFJkXvMTf7kCVqTOPMh1SxtvJaGi&location='+lat+'%2C'+lng+'&outFormat=json&thumbMaps=false',
    )
      .then((response) => response.json())
      .then((responseJson) => {
        console.log(
          'ADDRESS GEOCODE is BACK!! => ' + JSON.stringify(responseJson),
        );
      });
  };
Posted by: Guest on January-10-2021
0

get city name from latitude and longitude in php using geocode api

<p><button onclick="getLocation()">Get My Location</button></p>
<p id="demo"></p>
<script src="http://maps.google.com/maps/api/js?key=YOUR_API_KEY"></script>
Posted by: Guest on July-21-2020

Code answers related to "how to get location name from latitude and longitude"

Browse Popular Code Answers by Language