title: Zoom (center) map to markers in OpenLayer3
body: <p><br>I have problem with my OpenLayer3 map. When I add some markers to map I want to resize my map and change the zoom so that all markers were set on the screen. </p>
  
  <p>My code looks like:</p>
  
  <pre><code>/** CREATE MARKERS **/
  for (var i=0;i&lt;1;i++){
    var iconFeature = new ol.Feature({
      geometry: new
        ol.geom.Point(ol.proj.transform([Math.random()*360-180, Math.random()*180-90], 'EPSG:4326',   'EPSG:3857'))
    });
    vectorSource.addFeature(iconFeature);
    var newBound = ol.Bounds();
    newBound.extend([Math.random()*360-180, Math.random()*180-90]);
    map.zoomToExtent(newBound);
  }
  
  /** MARKER STYLE **/
  var iconStyle = [
    new ol.style.Style({
    image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
      anchor: [0.5, 46],
      anchorXUnits: 'fraction',
      anchorYUnits: 'pixels',
      opacity: 1,
      scale: 0.07,
      src: 'marker.png'
    }))
    })
  ];
  
  /** ADD LAYER VECTOR **/
  var vectorLayer = new ol.layer.Vector({
    source: vectorSource,
    style: iconStyle
  });
  
  
  /** INIT MAP **/
  var map = new ol.Map({
    layers: [
      new ol.layer.Tile({
        source: new ol.source.MapQuest({layer: 'sat'})
      }),
      vectorLayer
    ],
    overlays: [overlay],
    target: 'map',
    view: new ol.View({
      center: [0, 0],
      zoom: 2
    })
  });
  </code></pre>
  
  <p>Is there a way to zoom the map to markers?</p>