logo
logo
Sign in

Get Users Latitude and Longitude using Google Place API and PHP

avatar
Paritosh Pandey
Get Users Latitude and Longitude using Google Place API and PHP

This tutorial is prepared for those Developers who want to get users latitude and longitude.

This can be done by many methods, here I’m going to use Google Place API to make such things easier.

The method and logic I’m going to use is when user fills the registration form up, we’d capture his city value (Note: city value would be Google Place Search), before proceeding further you have to read my previous post Auto complete Address Search Module Using Google API and PHP, this is the module from which we ask user to enter their location, further this location is used to capture user’s coordinates using another Google API.

Latitude and Longitude are the entity that represents the coordinates at the geographic coordinate system.

For example, every actual house has its own address (which includes the house number, the street name, city, country, etc), every single dot on the surface of the earth can be specified by the latitude and longitude coordinates.

Therefore, by using these coordinates we can specify virtually any point on earth.

collect
0
avatar
Paritosh Pandey
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more