Revision d8e5f1be
Added by Andreas Kohlbecker over 2 years ago
modules/cdm_dataportal/includes/maps.inc | ||
---|---|---|
57 | 57 |
|
58 | 58 |
$map_settings = get_array_variable_merged(CDM_MAP_DISTRIBUTION, CDM_MAP_DISTRIBUTION_DEFAULT); |
59 | 59 |
|
60 |
if($force_map_type === NULL){
|
|
61 |
$force_map_type = $map_settings['map_type'];
|
|
62 |
}
|
|
60 |
if($force_map_type === NULL){ |
|
61 |
$force_map_type = $map_settings['map_type']; |
|
62 |
} |
|
63 | 63 |
|
64 |
if ($force_map_type == 1) {
|
|
65 |
_add_jquery_ui();
|
|
66 |
$map_html = cdm_map_openlayers(
|
|
67 |
$map_id,
|
|
68 |
$occurrence_query,
|
|
69 |
$kml_request_url,
|
|
70 |
$distribution_query,
|
|
71 |
$legend_format_query,
|
|
72 |
$map_settings['caption'],
|
|
73 |
$event_listeners,
|
|
74 |
$resizable
|
|
75 |
);
|
|
76 |
}
|
|
77 |
else {
|
|
78 |
$map_height = round($map_settings['image_map']['width'] / (float)$map_settings['aspect_ratio']);
|
|
79 |
$map_html = cdm_map_plain_image(
|
|
80 |
$map_settings['image_map']['width'],
|
|
81 |
$map_height,
|
|
82 |
$occurrence_query,
|
|
83 |
$distribution_query,
|
|
84 |
$legend_format_query,
|
|
85 |
$map_settings['caption']
|
|
86 |
);
|
|
87 |
}
|
|
64 |
if ($force_map_type == 1) { |
|
65 |
_add_jquery_ui(); |
|
66 |
$map_html = cdm_map_openlayers( |
|
67 |
$map_id, |
|
68 |
$occurrence_query, |
|
69 |
$kml_request_url, |
|
70 |
$distribution_query, |
|
71 |
$legend_format_query, |
|
72 |
$map_settings['caption'], |
|
73 |
$event_listeners, |
|
74 |
$resizable |
|
75 |
); |
|
76 |
} |
|
77 |
else { |
|
78 |
$map_height = round($map_settings['image_map']['width'] / (float)$map_settings['aspect_ratio']); |
|
79 |
$map_html = cdm_map_plain_image( |
|
80 |
$map_settings['image_map']['width'], |
|
81 |
$map_height, |
|
82 |
$occurrence_query, |
|
83 |
$distribution_query, |
|
84 |
$legend_format_query, |
|
85 |
$map_settings['caption'] |
|
86 |
); |
|
87 |
} |
|
88 | 88 |
return markup_to_render_array($map_html); |
89 | 89 |
} |
90 | 90 |
|
Also available in: Unified diff
fix #9175 map detects empty kml layer and removes itself