[GIS] Coordinate System Google Maps API

coordinate systemgoogle-maps-apipostgis

I am making an application in java using GMaps4JSF where the person will enter the address on the map I'll take this coordinate and consult on my postgis base regions in which region this point is inserted and return this information on the screen.
It's very simple. Google Maps Api uses the Mercator projection (EPSG: 3857), the coordinate of the queried map will be returned in this projection? I must redesign my data to it does not need to do conversions.

Best Answer

Although the underlying tiles are projected to epsg:3857, the Maps API accepts Latitude/Longitude pairs in epsg:4326 (vs y/x coordinates in meters, which would be implied by 3857).

Therefore if you want to draw a polygon on the map, you would pass the API latitude/longitude and it will be projected appropriately to match the underlying data (note you may wish to specify geodesic:true in your overlay options in the API)

That said you didn't specify what projection your data in PostGIS is index as, so I can't say whether you need to change anything.

Related Question