code: function (layerCollection, options) {
      var self = this;
  
      var oldLayers = this._layerViews;
      this._layerViews = {};
  
      function findLayerView (layer) {
        var lv = _.find(oldLayers, function (layerView) {
          var m = layerView.model;
          return m.isEqual(layer);
        });
        return lv;
      }
  
      function canReused (layer) {
        return self.map.layers.find(function (m) {
          return m.isEqual(layer);
        });
      }
  
      // remove all
      for (var layer in oldLayers) {
        var layerView = oldLayers[layer];
        if (!canReused(layerView.model)) {
          layerView.remove();
        }
      }
  
      this.map.layers.each(function (layerModel) {
        var layerView = findLayerView(layerModel);
        if (!layerView) {
          self._addLayer(layerModel, layerCollection, {
            silent: (options && options.silent) || false,
            index: options && options.index
          });
        } else {
          layerView.setModel(layerModel);
          self._layerViews[layerModel.cid] = layerView;
        }
      });
    }
docs: this replaces the default functionality to search for already added views so they are not replaced