A region or city is identified by coordinates (x, y, z) with Google Maps?
Because I made design a geolocation application and I do not know how to record in the database the locations marked by the user.
If a point is located by (x, y, z), how such a city or region is located?
Thank you
Any place on earth can be referred to using its coordinates (latitude (y), longitude (x)). You only need the ‘z’ coordinate if you want to refer to elevation at that point.
Having said that:
A restaurant, or a city, or even a country can be represented by a latitude and longitude, but with varying accuracy. if you are trying to represent a restaurant using a lat-lon (with decimal accuracy of at least 6 digits) then it is a pretty accurate location.
You can also represent the city which that restaurants belongs to using the same lat-long, but it wont be accurate.
You can imagine accuracy like this. If you have pin-pointed at a location on map like google-map, if you are zoomed-out quite a bit, that pin will represent a city, or even a country. But if you zoom in enough, that pin is just one location in a big region.
Now to truly represent a region you need a polygon made up of a series of long lat (x,y) points which enclose the region.
To record locations in database you have two ways to represent location.
IF you want to save a point, you can save a location name and its x,y (long, lat) in a database row.
If you want to represent entire regions in database, like say New-York, you will want to store the name ‘New York’ with the series of lat-long forming polygon of boundaries of New York.
Hope that makes sense.