title: OpenLayers 3 create bounding extent which includes a few points
body: <p>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. </p>
  
  <p>My code looks like this:</p>
  
  <pre><code>var centerView = ol.proj.transform([lng, lat], 'EPSG:4326', 'EPSG:3857');
  
  var iconFeature = new ol.Feature({
    geometry: new ol.geom.Point(ol.proj.transform([lng, lat], 'EPSG:4326',   'EPSG:3857')),
    name: 'Ziel'
  });
  
  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());
  </code></pre>
  
  <p>But this code gives me a extent of the currentLoc and not the whole extent which includes both points. </p>
  
  <p>What am I doing wrong?</p>