title: Hide layer or features on zooming in openlayers 3?
body: <p>Is it possible to hide all features on a layer when zooming occurs? I've tried to set both the visible and opacity properties on the layer itself to now show when zooming. Also i've tried to set style on each feature to 'none' but it dosen't seem to work. I've tried with these two alternatives:</p>
  
  <p><strong>1.</strong></p>
  
  <pre><code>function hideGraphicsFeatures(hide) {
    if(hide) {
       graphicsLayer.setVisible(false);
    } else {
       graphicsLayer.setVisible(true);
    }
    map.render();      
  </code></pre>
  
  <p>}</p>
  
  <p><strong>2.</strong></p>
  
  <pre><code>function hideGraphicsFeatures(hide) {
    var features = graphicsLayer.getFeatures();
    if(hide) {
       for (var i = features.length - 1; i &gt;= 0; i--) {
             features[i].style.display = 'none';
       };
    } else {
       for (var i = features.length - 1; i &gt;= 0; i--) {
             features[i].style.display = ''; // show. Set to anything but 'none'
       };
    }
    map.render();      
  </code></pre>
  
  <p>}</p>