Revision d5f29731
Added by Andreas Kohlbecker almost 8 years ago
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
#5883 fixing map baselayer config for the dafault case