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.
Asked
Active
Viewed 2,849 times
1 Answers
-1
<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>

Mohsin Mujawar
- 186
- 7
-
1This does not answer OP's original question – smcjones Nov 25 '18 at 01:32
-
Adarsh asked two questions second part of question was already answered I answered the first part. – Mohsin Mujawar Nov 25 '18 at 01:58
-
I want php code not javascript code, because I have to use it in controller on in javascript file – Adarsh Bhatt Nov 26 '18 at 05:00