function toggleLayerFromSplitMaps(state, layer) {
  return state.splitMaps.map(settings => {
    const {layers} = settings;
    const newLayers = {
      ...layers,
      [layer.id]: generateLayerMetaForSplitViews(layer)
    };

    return {
      ...settings,
      layers: newLayers
    };
  });
}
function toggleLayerFromSplitMaps(state, layer) {
  return state.splitMaps.map(settings => {
    const {layers} = settings;
    const newLayers = {
      ...layers,
      [layer.id]: generateLayerMetaForSplitViews(layer)
    };

    return {
      ...settings,
      layers: newLayers
    };
  });
}
function toggleLayerFromSplitMaps ( state , layer ) { return state . splitMaps . map ( settings => { const { layers } = settings ; const newLayers = { ... layers , [ layer . id ] : generateLayerMetaForSplitViews ( layer ) } ; return { ... settings , layers : newLayers } ; } ) ; }
Hide an existing layers from custom map layer objects
@param {Object} state
@param {Object} layer
@returns {Object} Maps of custom layer objects
Hide an existing layers from custom map layer objects
toggleLayerFromSplitMaps - Toggles a layer from a list of split maps