You are here

gmap_debug.module in GMap Addons 5

Same filename and directory in other branches
  1. 6 gmap_debug/gmap_debug.module
  2. 7 gmap_debug/gmap_debug.module

Debugging helpers for gmap.

File

gmap_debug/gmap_debug.module
View source
<?php

/**
 * @file
 * Debugging helpers for gmap.
 */

/**
 * Implementation of hook_block().
 */
function gmap_debug_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      return array(
        'gmap_debug' => array(
          'info' => t('GMap Debug'),
        ),
      );
    case 'view':
      if ($delta = 'gmap_debug') {
        drupal_add_js(drupal_get_path('module', 'gmap_debug') . '/gmap_debug.js', 'module', 'header', FALSE, TRUE, FALSE);
        $output = '';
        $output .= '<li class="leaf"><a href="" id="gmap-debug-forcesizecheck">' . t('Force size check') . '</a></li>';
        $output .= '<li class="leaf"><a href="" id="gmap-debug-reboot">' . t('Reboot map') . '</a></li>';
        return array(
          'subject' => t('GMap Debug'),
          'content' => "\n<ul class=\"menu\">\n" . $output . "\n</ul>\n",
        );
      }
  }
}

Functions

Namesort descending Description
gmap_debug_block Implementation of hook_block().