Revision fd04f921
Added by Andreas Kohlbecker over 12 years ago
5.x/modules/cdm_dataportal/theme/cdm_dataportal.page.theme | ||
---|---|---|
234 | 234 |
$specimensOrObersvations = cdm_ws_get(CDM_WS_TAXON, array($taxon->uuid, 'specimensOrObersvations') ); |
235 | 235 |
|
236 | 236 |
//collect media (fieldObjectMedia, derivedUnitMedia) and add as fields |
237 |
foreach($specimensOrObersvations as $specimensOrObersvation) {
|
|
238 |
$specimensOrObersvation->_fieldObjectMedia = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, array($specimensOrObersvation->uuid, 'fieldObjectMedia') );
|
|
239 |
$specimensOrObersvation->_derivedUnitMedia = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, array($specimensOrObersvation->uuid, 'derivedUnitMedia') );
|
|
237 |
foreach($specimensOrObersvations as &$occurrence) {
|
|
238 |
$occurrence->_fieldObjectMedia = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, array($occurrence->uuid, 'fieldObjectMedia') );
|
|
239 |
$occurrence->_derivedUnitMedia = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, array($occurrence->uuid, 'derivedUnitMedia') );
|
|
240 | 240 |
// $derivedUnitFacde = cdm_ws_get(CDM_WS_DERIVEDUNIT_FACADE, array($descriptionElement->associatedSpecimenOrObservation->uuid) ); |
241 | 241 |
// $descriptionElement->_titleCache = $derivedUnitFacde->titleCache; |
242 | 242 |
} |
243 | 243 |
|
244 |
if(variable_get('cdm_dataportal_map_openlayers', 1)){ |
|
244 |
if(count($specimensOrObersvations) > 0){ |
|
245 |
|
|
245 | 246 |
$occurrenceQuery = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid); |
246 | 247 |
$occurrenceQuery = $occurrenceQuery->String; |
247 |
$out .= get_openlayers_map(variable_get('cdm_dataportal_geoservice_display_width', false), $occurrenceQuery); |
|
248 |
|
|
249 |
if(variable_get('cdm_dataportal_map_openlayers', 1)){ |
|
250 |
$out .= get_openlayers_map( |
|
251 |
variable_get('cdm_dataportal_geoservice_display_width', false), |
|
252 |
variable_get('cdm_dataportal_geoservice_bounding_box', false), |
|
253 |
$occurrenceQuery, |
|
254 |
null, |
|
255 |
$legendFormatQueryStr, |
|
256 |
variable_get('cdm_dataportal_geoservice_map_caption', '') |
|
257 |
); |
|
258 |
} else { |
|
259 |
//get_image_map($width, $occurrenceQuery = false, $distributionQuery = false, $legendFormatQuery = false, $map_caption = false ) |
|
260 |
$out .= get_image_map( |
|
261 |
variable_get('cdm_dataportal_geoservice_display_width', false), |
|
262 |
variable_get('cdm_dataportal_geoservice_bounding_box', false), |
|
263 |
$occurrenceQuery, |
|
264 |
null, |
|
265 |
$legendFormatQueryStr, |
|
266 |
variable_get('cdm_dataportal_geoservice_map_caption', '') |
|
267 |
); |
|
268 |
} |
|
269 |
|
|
248 | 270 |
} |
249 | 271 |
|
250 | 272 |
|
Also available in: Unified diff
fixing #2664 (Specimen maps are not shown in cyprus dev portal)