function openlayers_test_page in Openlayers 6.2
Same name and namespace in other branches
- 6 tests/openlayers_test.module \openlayers_test_page()
Callback for OpenLayers Test Page
1 string reference to 'openlayers_test_page'
- openlayers_test_menu in tests/
openlayers_test.module - Implementation of hook_menu().
File
- tests/
openlayers_test.module, line 233 - Main OpenLayers Test Module file
Code
function openlayers_test_page() {
$output = '';
$js_test_link = l(t('JS Testing Page.'), drupal_get_path('module', 'openlayers_test') . '/js/index.html');
// Add link to JS testing page for easy access.
$output .= '
<h3>' . t('Info') . '</h3>
<ul>
<li>' . $js_test_link . '</li>
</ul>';
// Render all presets
$presets = openlayers_presets();
foreach ($presets as $name => $preset) {
$output .= '
<h3>' . $preset->title . '</h3>
' . openlayers_render_map($preset->data) . '
';
}
/*
// Create collapsed fieldset
//$render_fieldset = openlayers_render_map();
$element = array(
'#value' => $render_fieldset['themed'],
'#title' => t('Fieldset Example'),
'#collapsed' => TRUE,
'#collapsible' => TRUE,
);
$fieldset = theme_fieldset($element);
*/
// Create output
$output .= '
<!-- Not including fieldset cause its broken -->
';
return $output;
}