src/reducers/vis-state-updaters.js
function removeLayerFromSplitMaps(state, layer) {
  return state.splitMaps.map(settings => {
    const {layers} = settings;
    /* eslint-disable no-unused-vars */
    const {[layer.id]: _, ...newLayers} = layers;
    /* eslint-enable no-unused-vars */
    return {
      ...settings,
      layers: newLayers
    };
  });
}
function removeLayerFromSplitMaps(state, layer) {
  return state.splitMaps.map(settings => {
    const {layers} = settings;
    /* eslint-disable no-unused-vars */
    const {[layer.id]: _, ...newLayers} = layers;
    /* eslint-enable no-unused-vars */
    return {
      ...settings,
      layers: newLayers
    };
  });
}
function removeLayerFromSplitMaps ( state , layer ) { return state . splitMaps . map ( settings => { const { layers } = settings ; /* eslint-disable no-unused-vars */ const { [ layer . id ] : _ , ... newLayers } = layers ; /* eslint-enable no-unused-vars */ return { ... settings , layers : newLayers } ; } ) ; }
Remove an existing layer from split map settings
@param {Object} state `visState`
@param {Object} layer
@returns {Object} Maps of custom layer objects
Remove an existing layer from split map settings