title: remove layer from open layers not working
body: <p>I am trying to add layers from GeoServer; it's working fine but removing layers is not working. This is my code:</p>
  
  <pre class="lang-js prettyprint-override"><code>function loadTOCLayer(layerName) {
    var tl = new ol.layer.Tile({
      extent: [-20037508.34, -20037508.34, 20037508.34, 20037508.34],
      source: new ol.source.TileWMS( /** @type {olx.source.TileWMSOptions} */ ({
        url: 'http://172.16.1.58:8080/geoserver/KBJNL/gwc/service/wms',
        params: {
          'LAYERS': layerName,
          'TILED': true
        },
        serverType: 'geoserver'
      }))
    });
  
    map.addLayer(tl);
  }
  
  
  function removeTOCLayer(ss) {
    map.removeLayer(ss);
  }
  </code></pre>