[GIS] OpenLayers 3 get current center

openlayers

Is it possible to get the current position (lat/lng/zoom) in OpenLayers 3 (Like map.getCenter() in Leaflet)? I couldn't find anything in the docs.

Best Answer

Just type:

map.getView().getCenter()

You should look at official examples source code: they will really help you.