Revision d5661a4c
Added by Andreas Kohlbecker over 10 years ago
7.x/modules/cdm_dataportal/includes/maps.inc | ||
---|---|---|
48 | 48 |
* |
49 | 49 |
* @ingroup compose |
50 | 50 |
*/ |
51 |
function compose_map($occurrence_query, $distribution_query, $legend_format_query, array $event_listeners = array()) {
|
|
51 |
function compose_map($occurrence_query = NULL, $distribution_query = NULL, $legend_format_query = NULL, array $event_listeners = array()) {
|
|
52 | 52 |
|
53 | 53 |
$map_settings = get_array_variable_merged(CDM_MAP_DISTRIBUTION, CDM_MAP_DISTRIBUTION_DEFAULT); |
54 | 54 |
if ($map_settings['map_type'] == 1) { |
... | ... | |
106 | 106 |
|
107 | 107 |
$cdm_openlayers_options = array( |
108 | 108 |
'legendPosition' => '3', |
109 |
'boundingBox' => "'" . $map_settings['bbox'] . "'",
|
|
110 |
'distributionOpacity' => "'" . $map_settings['distribution_opacity'] . "'",
|
|
111 |
'legendOpacity' => "'" . $map_settings['legend']['opacity'] . "'",
|
|
109 |
'boundingBox' => $map_settings['bbox'],
|
|
110 |
'distributionOpacity' => $map_settings['distribution_opacity'],
|
|
111 |
'legendOpacity' => $map_settings['legend']['opacity'],
|
|
112 | 112 |
'showLayerSwitcher' => $map_settings['openlayers']['show_layer_switcher'] == 1, |
113 | 113 |
'displayOutsideMaxExtent' => $map_settings['openlayers']['display_outside_max_extent'] == 1 |
114 | 114 |
// if no baseLayerNames or defaultBaseLayerName are not defined |
7.x/modules/cdm_dataportal/settings.php | ||
---|---|---|
1611 | 1611 |
|
1612 | 1612 |
$current_geoserver_settings = get_edit_map_service_settings(); |
1613 | 1613 |
$map_distribution = get_array_variable_merged(CDM_MAP_DISTRIBUTION, CDM_MAP_DISTRIBUTION_DEFAULT); |
1614 |
// The default layer must always be enabled |
|
1615 |
$preferred_layer = $map_distribution['openlayers']['base_layers']['PREFERRED']; |
|
1616 |
$map_distribution['openlayers']['base_layers'][$preferred_layer] = $preferred_layer; |
|
1614 | 1617 |
|
1615 | 1618 |
$form = array(); |
1616 | 1619 |
|
... | ... | |
1628 | 1631 |
'#description' => 'The preview of the map' |
1629 | 1632 |
. ($dummy_distribution_query != null ? |
1630 | 1633 |
' may not be accurate in case if image maps, please check the map display in the taxon pages.': |
1631 |
'.<br/>Hold down Strg and drag with your mouse to select a bbox to zoom to. <br/>The bbox of the visisble area of the map is always displayed below the map.')
|
|
1634 |
'.<br/>Hold down Strg and drag with your mouse to select a bbox to zoom to. <br/>The bbox of the visible area of the map is always displayed below the map.') |
|
1632 | 1635 |
); |
1633 | 1636 |
$form['map_preview']['map'] = compose_map(NULL, $dummy_distribution_query, NULL, |
1634 | 1637 |
array( |
... | ... | |
1726 | 1729 |
Use "-180,-90,180,90" for the whole world. Leave <strong>empty</strong> |
1727 | 1730 |
to let the map <strong>automatically zoom</strong> to the bounds enclosing the shown data.</p> |
1728 | 1731 |
<strong>TIP: </strong>You can use the map preview above to choose a bbox from the map. Maybe you need to change the map type to OpeLayers. |
1729 |
Hold down Strg and drag with your mouse to select a bbox to zoom to. The bbox of the visisble area of the map is always displayed
|
|
1732 |
Hold down Strg and drag with your mouse to select a bbox to zoom to. The bbox of the visible area of the map is always displayed |
|
1730 | 1733 |
below the map from where you can copy the bbox string.</p>'), |
1731 | 1734 |
); |
1732 | 1735 |
|
Also available in: Unified diff
fixing map related bugs and typos