title: How to set zoom and center automatically based on GeoJSON features
body: <p>I load some features from .json file, and would like to automatically set view wuth zoom to see all loaded features. I user OpenLayers version 3.
  Here's what I have:</p>
  
  <pre><code>var gjsonFile = new ol.layer.Vector({
      source: new ol.source.GeoJSON({
          url: 'map.json',
          projection: 'EPSG:3857'
      })
      })
  });
  
  var map = new ol.Map({
      view: new ol.View({
          center: ol.proj.transform([-77.0087,38.8691], 'EPSG:4326', 'EPSG:3857'),
          zoom: 12
      }),
      layers: [
          new ol.layer.Tile({
          source: new ol.source.OSM()
          }),
          gjsonFile
      ],
      target: 'map1'
  });
  </code></pre>