Project

General

Profile

Revision d5f29731

IDd5f29731cb5393aabe6d2b98d9a3976ed7f4da8d
Parent a5ab2641
Child 38da4e54

Added by Andreas Kohlbecker over 5 years ago

#5883 fixing map baselayer config for the dafault case

View differences:

modules/cdm_dataportal/includes/maps.inc
139 139

  
140 140
    $cdm_openlayers_options['baseLayerNames'] = array_values($layer_names);
141 141

  
142
    if(isset($cdm_openlayers_options['PREFERRED'])){
142
    if($layer_names['PREFERRED']){
143 143
      $cdm_openlayers_options['defaultBaseLayerName'] = $layer_names['PREFERRED'];
144
      unset($cdm_openlayers_options['PREFERRED']);
144
      unset($layer_names['PREFERRED']); // why is this needed?
145 145
      if(!array_search($cdm_openlayers_options['defaultBaseLayerName'], $cdm_openlayers_options['baseLayerNames'])){
146
        // the default layer mus also  be in the list of base layers 
146
        // the default layer must also  be in the list of base layers
147 147
        $cdm_openlayers_options['baseLayerNames'][] = $cdm_openlayers_options['defaultBaseLayerName'];
148 148
      }
149 149
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)