Extracting Lat/lng data for a list of places in an automated way
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKPz5qhCkKGdpPJ0wkSm5JqlliSJoZg92-H4DuCruovhkVFuXerCphZt9wys_Gr3uwQyXObMHDwattjG5BSeCEl_LdDq1GPLct8qYyRyX4fZ9C93oW-TX7IGZLYDwqRgfFCXA4aUxkBAcS/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VebLk98DYwS3K2nWZSCatab-q4HrSuRk91M4fQA8SHrKU_-x-lq1n780pSU_bIVLqMRv6pc3dhhh-Y2PUwBS9mM0BxvY1eM6XsM-e7Diu4z-wAoeDG0vB3-2_1U9RE8sO0lg4PHiIXbI/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
Extracting Lat/lng data for a list of places in an automated way
I have a list of 1663 place/address and i need for each of it the Lat/Lng using the address as an input or search criteria. is there a way to automate the task of finding lat/lng by place address using google map api?
Thanks,
1 Answer
1
$data = "ur adress"
$string = json_decode(file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?address=$data&sensor=true_or_false"));
$lat = $string->results[0]->geometry->location->lat;
$lng = $string->results[0]->geometry->location->lng;
as inspiration in php
Thank you for helping me, i can javascript it.
– Safé Dkhil
45 mins ago
developers.google.com/maps/documentation/javascript/geocoding btw u should take a break between the query, google like to answer sometimes with zero results
– StefanBD
43 mins ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it."
– Zev
52 mins ago