I had the same problem. I think the solution is:
var myMapCenter=map.getViewBounds().getCenter();