Get Latitude Longitude from address in php

2.8k Views Asked by At

I am developing an mobile application for ANDROID and IOS. I want to get latitude , longitude from address pass by application to API. Which Google API is use for getting latitude and longitude from address and Also let me know is there any daily limit for calling API per day in php and android and ios.

1

There are 1 best solutions below

3
On
    <script
        src="https://code.jquery.com/jquery-3.3.1.min.js"
        integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
        crossorigin="anonymous">

            // get you address field
            var city = document.getElementById("home_city_select").value;

            var jsonLtdLng="https://maps.googleapis.com/maps/api/geocode/json?address="+city+"&key=API_KEY";

            $.getJSON(jsonLtdLng, function (data) {
              console.log(data.results[0].geometry.location.lat);
            console.log(data.results[0].geometry.location.lng);
            });
</script>