Revision 753d936d
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/includes/maps.inc | ||
---|---|---|
67 | 67 |
if ($force_map_type == 1) { |
68 | 68 |
_add_jquery_ui(); |
69 | 69 |
$map_html = get_openlayers_map( |
70 |
$map_settings['bbox'], |
|
71 | 70 |
$occurrence_query, |
72 | 71 |
$distribution_query, |
73 | 72 |
$legend_format_query, |
... | ... | |
81 | 80 |
$map_html = get_image_map( |
82 | 81 |
$map_settings['image_map']['width'], |
83 | 82 |
$map_height, |
84 |
$map_settings['bbox'], |
|
85 | 83 |
$occurrence_query, |
86 | 84 |
$distribution_query, |
87 | 85 |
$legend_format_query, |
... | ... | |
215 | 213 |
* @return String |
216 | 214 |
* rendered html |
217 | 215 |
*/ |
218 |
function get_openlayers_map($bounding_box = FALSE, $occurrenceQuery = FALSE, $distributionQuery = FALSE,
|
|
216 |
function get_openlayers_map($occurrenceQuery = FALSE, $distributionQuery = FALSE, |
|
219 | 217 |
$legendFormatQuery = FALSE, $map_caption = FALSE, array $event_listeners = array(), |
220 | 218 |
$resizable = false) { |
221 | 219 |
|
... | ... | |
234 | 232 |
$width = 512; |
235 | 233 |
|
236 | 234 |
$openlayers_map_query_string = '&img=false&ms=' . $width |
237 |
. ($bounding_box ? '&bbox=' . $bounding_box : '') |
|
238 | 235 |
. ($labels_on ? '&label=' . $labels_on : ''); |
239 | 236 |
|
240 | 237 |
if ($occurrenceQuery) { |
... | ... | |
362 | 359 |
* @todo Enter description here ... |
363 | 360 |
* |
364 | 361 |
* @param unknown_type $width |
365 |
* @param unknown_type $bounding_box |
|
366 | 362 |
* @param unknown_type $occurrenceQuery |
367 | 363 |
* @param unknown_type $distributionQuery |
368 | 364 |
* @param unknown_type $legendFormatQuery |
... | ... | |
371 | 367 |
* @return String |
372 | 368 |
* rendered html |
373 | 369 |
*/ |
374 |
function get_image_map($width, $height= NULL, $bounding_box = FALSE, $occurrenceQuery = FALSE, $distributionQuery = FALSE, $legendFormatQuery = FALSE, $map_caption = FALSE) {
|
|
370 |
function get_image_map($width, $height= NULL, $occurrenceQuery = FALSE, $distributionQuery = FALSE, $legendFormatQuery = FALSE, $map_caption = FALSE) { |
|
375 | 371 |
|
376 | 372 |
$map_settings = get_array_variable_merged(CDM_MAP_DISTRIBUTION, CDM_MAP_DISTRIBUTION_DEFAULT); |
377 | 373 |
|
... | ... | |
382 | 378 |
|
383 | 379 |
$query_string = '&img=true&recalculate=false&ms=' . $width . ($height ? ',' . $height : '') |
384 | 380 |
// Additional query parameters as set in the data portal admin section. |
385 |
. ($bounding_box ? '&bbox=' . $bounding_box : '')
|
|
381 |
. ($map_settings['bbox'] ? '&bbox=' . $map_settings['bbox'] : '')
|
|
386 | 382 |
. ($map_settings['show_labels'] ? '&label=' . $map_settings['show_labels'] : ''); |
387 | 383 |
|
388 | 384 |
if ($map_caption) { |
Also available in: Unified diff
fixing problems in openlayers maps with userdefined bbox and projections