_modelsToParams() {
    const layerGroups = this.get('layerGroupRegistry');

    // calculate new param state object
    const newParams = layerGroups
      .filterBy('visible')
      .map((layerGroup) => {
        if (layerGroup.get('layerVisibilityType') === 'singleton') {
          return { id: layerGroup.get('id'), selected: layerGroup.get('selected.id') };
        }

        return layerGroup.get('id');
      }).sort();

    // set the new param state object
    this.set('visibleLayerGroups', newParams);
  }
// translate model state to a param state object
translate model state to a param state object
translate model state to a param state object
_modelsToParams() {
    const layerGroups = this.get('layerGroupRegistry');
    const newParams = layerGroups
      .filterBy('visible')
      .map((layerGroup) => {
        if (layerGroup.get('layerVisibilityType') === 'singleton') {
          return { id: layerGroup.get('id'), selected: layerGroup.get('selected.id') };
        }
        return layerGroup.get('id');
      }).sort();
    this.set('visibleLayerGroups', newParams);
  }
_modelsToParams ( ) { const layerGroups = this . get ( 'layerGroupRegistry' ) ; const newParams = layerGroups . filterBy ( 'visible' ) . map ( ( layerGroup ) => { if ( layerGroup . get ( 'layerVisibilityType' ) === 'singleton' ) { return { id : layerGroup . get ( 'id' ) , selected : layerGroup . get ( 'selected.id' ) } ; } return layerGroup . get ( 'id' ) ; } ) . sort ( ) ; this . set ( 'visibleLayerGroups' , newParams ) ; }
translate model state to a param state object
translate model state to a param state object
// calculate new param state object // set the new param state object