Revision 276f39f6
Added by Katja Luther over 5 years ago
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
49 | 49 |
} |
50 | 50 |
|
51 | 51 |
$by_associatedtaxon_query = http_build_query($by_associatedtaxon_query_parameters); |
52 |
$cdm_dataportal_list_view = false; |
|
52 |
|
|
53 | 53 |
$ws_string = 'specimensOrObservation'; |
54 |
if ($cdm_dataportal_list_view){
|
|
54 |
if (variable_get('cdm_dataportal_specimen_derivate_tree')){
|
|
55 | 55 |
$ws_string .= "DTOs"; |
56 | 56 |
}else{ |
57 | 57 |
$ws_string .= "s"; |
... | ... | |
98 | 98 |
// --- get map service HTTP query parameters |
99 | 99 |
|
100 | 100 |
if (count($specimensOrObservations) > 0) { |
101 |
$occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query); |
|
102 |
//the information about the points are already available |
|
103 |
$points = array(); |
|
104 |
foreach ($specimensOrObservations as &$occurrence) { |
|
105 |
if ($occurrence != null) { |
|
106 |
$points[] = $occurrence->uuid; |
|
101 |
if (count($specimensOrObservations) > 0) { |
|
102 |
$occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query); |
|
103 |
|
|
104 |
$map_visibility = variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT); |
|
105 |
if($map_visibility == 'always' || |
|
106 |
variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT) == 'automatic' && |
|
107 |
(isset($occurrence_queryDto->fieldUnitPoints[0]) || isset($occurrence_queryDto->derivedUnitPoints[0])) |
|
108 |
) |
|
109 |
{ |
|
110 |
$occurrence_query = $occurrence_queryDto->occurrenceQuery; |
|
111 |
$legend_format_query = null; |
|
112 |
$distribution_query = NULL; |
|
113 |
$map_render_array = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array()); |
|
107 | 114 |
} |
108 | 115 |
} |
109 |
|
|
110 |
$parameterFieldUnitUuids = 'fieldUnitUuidList=' . urlencode(implode(',', $points)); |
|
111 |
// $occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query); |
|
112 |
|
|
113 |
$occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP_FOR_FIELDUNITS, null, $parameterFieldUnitUuids); |
|
114 |
|
|
115 |
$map_visibility = variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT); |
|
116 |
if($map_visibility == 'always' || |
|
117 |
variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT) == 'automatic' && |
|
118 |
(isset($occurrence_queryDto->fieldUnitPoints[0]) || isset($occurrence_queryDto->derivedUnitPoints[0])) |
|
119 |
) |
|
120 |
{ |
|
121 |
$occurrence_query = $occurrence_queryDto->occurrenceQuery; |
|
122 |
$legend_format_query = null; |
|
123 |
$distribution_query = NULL; |
|
124 |
$map_render_array = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array()); |
|
125 |
} |
|
126 | 116 |
} |
127 | 117 |
|
128 | 118 |
// ------------------------------------------------------- |
... | ... | |
160 | 150 |
10 // weight |
161 | 151 |
); |
162 | 152 |
} |
163 |
else if($cdm_dataportal_list_view){
|
|
153 |
else if(variable_get('cdm_dataportal_specimen_derivate_tree')){
|
|
164 | 154 |
$specimen_table = array( |
165 | 155 |
'#theme' => 'table', |
166 | 156 |
'#weight' => 2, |
Also available in: Unified diff
add the treeview as third variant for the specimen page