Revision d2fd2a4c
Added by Andreas Kohlbecker over 10 years ago
7.x/modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
88 | 88 |
|
89 | 89 |
// --- get map service HTTP query paramaters |
90 | 90 |
if (count($specimensOrObservations) > 0) { |
91 |
$occurrenceQuery = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query);
|
|
91 |
$occurrence_query = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query);
|
|
92 | 92 |
|
93 |
if( isset($occurrenceQuery->String) ) { |
|
94 |
$occurrenceQuery = $occurrenceQuery->String; |
|
93 |
if( isset($occurrence_query->String) ) { |
|
94 |
$occurrence_query = $occurrence_query->String; |
|
95 |
$legend_format_query = null; |
|
96 |
$distribution_query = NULL; |
|
95 | 97 |
|
96 |
$legendFormatQueryStr = null; |
|
97 |
if (variable_get('cdm_dataportal_map_openlayers', 1)) { |
|
98 |
$map_html = get_openlayers_map(variable_get('cdm_dataportal_geoservice_display_width', 680), variable_get('cdm_dataportal_geoservice_bounding_box', FALSE), $occurrenceQuery, NULL, |
|
99 |
$legendFormatQueryStr, variable_get('cdm_dataportal_geoservice_map_caption', '')); |
|
100 |
} |
|
101 |
else { |
|
102 |
// get_image_map($width, $occurrenceQuery = FALSE, $distributionQuery = FALSE, $legendFormatQuery = FALSE, $map_caption = FALSE ) |
|
103 |
$map_html = get_image_map(variable_get('cdm_dataportal_geoservice_display_width', 680), variable_get('cdm_dataportal_geoservice_bounding_box', FALSE), $occurrenceQuery, NULL, |
|
104 |
$legendFormatQueryStr, variable_get('cdm_dataportal_geoservice_map_caption', '')); |
|
105 |
} |
|
106 |
$render_array['map'] = markup_to_render_array($map_html, 0); |
|
98 |
$render_array['map'] = compose_map($occurrence_query, $distribution_query, $legend_format_query); |
|
107 | 99 |
} |
108 | 100 |
} |
109 | 101 |
|
Also available in: Unified diff
upgrading OpenLayers to 2.13.1; refactoring cdm_openlayers maps, and thus fixing problems