I'm using Openlayers 2.13 to draw polygons. I need to save the polygons in my database. I use the following code to retrieve a WKT (Well-know Text) format of the polygon: getGeometry().toString();
The WKT looks like this:
"POLYGON((2214109.1963538 -3576110.9131445,2150513.5888293 -3766897.7357178,2529641.249071 -3656828.4150024,2529641.249071 -3656828.4150024,2214109.1963538 -3576110.9131445))"
However, when I try to write that to the DB i get the following error:
24201: Latitude values must be between -90 and 90 degrees.
Why are the GPS coordinates from Openlayers so big?
I've tried changing the projection of the map, but to no avail.