I am working on OpenLayers (ol3) and I want to get the Latitude, Longitude of the corners of the map being shown at a point. I tried using map.getView().getProjection().getExtent()
and converting the points from 'EPSG:3857' to 'EPSG:4326' but I get -180,-85.05112877980659,180,85.05112877980659
irrespective of the zoom level of the map I have set.
I would like to know the map view corner points dynamically.
Best Answer
You can get the current extent with:
Then you can use ol.proj.transformExtent to reproject the extent.