0

This is what I want to achieve:

A photo uploader that will be give the user an option to pin any location from the world, let's say his street.

When uploaded, photo is recorded in the databae with it's geolocation data.

When outputted in listout, the geolocation would be converted to City name and Country name.

Is this possible? If so is it practical?

Glorious Kale
  • 1,273
  • 15
  • 25

1 Answers1

1

It is possible, and it is practical but with some work.

When a user sets a location for their photo you save the Latitude, Longitude or LatLng which are two numbers used by google to locate a point in the map, then later to extract info from that point (city name, etc) see the code from this other answers:

Reverse Geocoding With Google Map API And PHP To Get Nearest Location Using Lat,Long coordinates

Reverse geocoding with Google Maps API

Community
  • 1
  • 1
Nelson
  • 49,283
  • 8
  • 68
  • 81