You are here

function openlayers_test_js in Openlayers 7.2

Callback for OpenLayers Test JS Page

1 string reference to 'openlayers_test_js'
openlayers_test_menu in tests/openlayers_test.module
Implements hook_menu().

File

tests/includes/openlayers_test.pages.inc, line 41
Pages for test module

Code

function openlayers_test_js() {
  drupal_add_js(drupal_get_path('module', 'openlayers_test') . '/js/qunit/qunit.js');
  drupal_add_css(drupal_get_path('module', 'openlayers_test') . '/js/qunit/qunit.css');
  drupal_add_js(drupal_get_path('module', 'openlayers_test') . '/js/openlayers_test.js');
  $output = '';

  // Display QUnit stuff
  $output .= '
    <h1 id="qunit-header">OpenLayers QUnit Tests</h1>
    <h2 id="qunit-banner"></h2>
    <h2 id="qunit-userAgent"></h2>
    <ol id="qunit-tests"></ol>
  ';

  // Render only specific maps
  $maps = array(
    'default',
    'behaviors_test',
  );
  foreach ($maps as $name => $map) {
    $output .= '
      ' . openlayers_render_map($map) . '
    ';
  }
  return $output;
}