Revision cc3c9807
Added by Andreas Kohlbecker almost 11 years ago
7.x/modules/cdm_dataportal/cdm_dataportal.install | ||
---|---|---|
128 | 128 |
* - migrating variable cdm_dataportal_show_default_image to cdm_taxon_profile_image['show'] |
129 | 129 |
* - enabling required module file |
130 | 130 |
* - enable new debug block for all dataportals |
131 |
* - migrating variables for map settings |
|
131 | 132 |
*/ |
132 | 133 |
function cdm_dataportal_update_7304() { |
133 | 134 |
|
... | ... | |
230 | 231 |
$tasks_performed[] = _remove_variable('cdm_webservice_debug'); |
231 | 232 |
$tasks_performed[] = _remove_variable('cdm_webservice_isStub'); |
232 | 233 |
|
234 |
/* |
|
235 |
* migrating variables for map settings |
|
236 |
*/ |
|
237 |
$cdm_map_distribution = array(); |
|
238 |
|
|
239 |
$cdm_map_distribution['width'] = variable_get('cdm_dataportal_geoservice_display_width', 390); |
|
240 |
$cdm_map_distribution['height'] = $cdm_map_distribution['width'] / 2; |
|
241 |
_remove_variable('cdm_dataportal_geoservice_display_width'); |
|
242 |
|
|
243 |
$cdm_map_distribution['bbox'] = variable_get('cdm_dataportal_geoservice_bounding_box', '-180,-90,180,90'); |
|
244 |
_remove_variable('cdm_dataportal_geoservice_bounding_box'); |
|
245 |
|
|
246 |
$cdm_map_distribution['show_labels'] = variable_get('cdm_dataportal_geoservice_labels_on', FALSE); |
|
247 |
_remove_variable('cdm_dataportal_geoservice_labels_on'); |
|
248 |
|
|
249 |
$cdm_map_distribution['caption'] = variable_get('cdm_dataportal_geoservice_map_caption', ''); |
|
250 |
_remove_variable('cdm_dataportal_geoservice_map_caption'); |
|
251 |
|
|
252 |
$cdm_map_distribution['distribution_opacity'] = variable_get('cdm_dataportal_geoservice_distributionOpacity', '0.5'); |
|
253 |
_remove_variable('cdm_dataportal_geoservice_distributionOpacity'); |
|
254 |
|
|
255 |
$cdm_map_distribution['mapType'] = variable_get('cdm_dataportal_map_openlayers', 1); |
|
256 |
_remove_variable('cdm_dataportal_map_openlayers'); |
|
257 |
|
|
258 |
// imageMap |
|
259 |
$cdm_map_distribution['image_map'] = array(); |
|
260 |
$cdm_map_distribution['image_map']['base_layer']= variable_get('map_base_layer', 'cyprusdivs'); |
|
261 |
_remove_variable('map_base_layer'); |
|
262 |
|
|
263 |
$cdm_map_distribution['image_map']['bg_color'] = variable_get('map_bg_color', '1874CD'); |
|
264 |
_remove_variable('map_bg_color'); |
|
265 |
|
|
266 |
$cdm_map_distribution['image_map']['layer_style'] = variable_get('map_base_layer_style', 'ffffff,606060,,'); |
|
267 |
_remove_variable('map_base_layer_style'); |
|
268 |
|
|
269 |
// OpenLayers |
|
270 |
$cdm_map_distribution['openlayers'] = array(); |
|
271 |
$cdm_map_distribution['openlayers']['base_layers'] = variable_get('baselayers', array('osgeo_vmap0' => 'osgeo_vmap0', 'PREFERRED' => 'osgeo_vmap0')); |
|
272 |
_remove_variable('baselayers'); |
|
273 |
|
|
274 |
$cdm_map_distribution['openlayers']['show_layer_switcher'] = variable_get('cdm_dataportal_geoservice_showLayerSwitcher', TRUE); |
|
275 |
_remove_variable('cdm_dataportal_geoservice_showLayerSwitcher'); |
|
276 |
|
|
277 |
$cdm_map_distribution['legend'] = array(); |
|
278 |
$cdm_map_distribution['legend']['show'] = variable_get('cdm_dataportal_geoservice_legend_on', TRUE); |
|
279 |
_remove_variable('cdm_dataportal_geoservice_legend_on'); |
|
280 |
|
|
281 |
$cdm_map_distribution['legend']['opacity'] = variable_get('cdm_dataportal_geoservice_legendOpacity', '0.5'); |
|
282 |
_remove_variable('cdm_dataportal_geoservice_legendOpacity'); |
|
283 |
|
|
284 |
$cdm_map_distribution['legend']['font_size'] = variable_get('cdm_dataportal_geoservice_legend_font_size', 10); |
|
285 |
_remove_variable('cdm_dataportal_geoservice_legend_font_size'); |
|
286 |
|
|
287 |
$cdm_map_distribution['legend']['font_style'] = variable_get('cdm_dataportal_geoservice_legend_font_style', FALSE); |
|
288 |
_remove_variable('cdm_dataportal_geoservice_legend_font_style'); |
|
289 |
|
|
290 |
$cdm_map_distribution['legend']['icon_width'] = variable_get('cdm_dataportal_geoservice_legend_icon_width', 35); |
|
291 |
_remove_variable('cdm_dataportal_geoservice_legend_icon_width'); |
|
292 |
|
|
293 |
$cdm_map_distribution['legend']['icon_height'] = variable_get('cdm_dataportal_geoservice_legend_icon_height', 15); |
|
294 |
_remove_variable('cdm_dataportal_geoservice_legend_icon_height'); |
|
295 |
|
|
296 |
variable_set('cdm_map_distribution', $cdm_map_distribution); |
|
297 |
$tasks_performed[] = 'variables for map settings migrated to new variable "cdm_map_distribution"'; |
|
298 |
|
|
233 | 299 |
return join(', ',$tasks_performed); |
234 | 300 |
} |
235 | 301 |
|
Also available in: Unified diff
refactoring map settings and rendering