Reputation: 588
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.
Upvotes: -2
Views: 2870
Reputation: 164
<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>
Upvotes: -1