I'm working with openlayer3 in my ionic application and am stucked with the problem with creating a bounding extent to get a few points in the viewport.
My code looks like this:
var destLoc = [6.18581,50.88093]; var currentLoc = [-122.29925626,37.47836852]; var ext = ol.extent.boundingExtent([destLoc,currentLoc]); map.getView().fit(ext,map.getSize());
But this code gives me a extent of the currentLoc and not the whole extent which includes both points.
What am I doing wrong?