Let's take a look at a couple of examples on coordinates from our previous maps:
map.getView().getCenter();
Depending on where you have panned, your output should read something like the following:
[9397474.0038099,3595597.9798909]
map.getView().getCenter();
You should see something like the following:
[-72.8125, 19.6875]
ol.coordinate.toStringHDMS([-72.8125, 19.6875]);
We just took a look at the longitude and latitude values for the center of the map in two different maps with different projections. When we call map.getView().getCenter(), we get back an ol.Coordinate object, in fact, an array of x, y values.
In the first map, the max extent of the map was between -20037508.342789244 meters and 20037508.342789244 meters for x, and between -20037508.342789244 meters and 20037508.342789244 meters for y.
These are the values used by the EPSG:3857, and it is an x and y type of Cartesian coordinate system. The values for x and y change in the second map because they are not in the same projection (they are in EPSG:4326). So, x are between -180° and 180° and y between -90° and 90°.
The x and y means longitude and latitude, respectively in EPSG:4326 and easting and northing in EPSG:3857. To understand definition of easting and northing, go to the Wikipedia dedicated page, https://en.wikipedia.org/wiki/Easting_and_northing.