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 .= theme('menu_item', l(t('Force size check'), '', array('attributes' => array('id' => 'gmap-debug-forcesizecheck'))), FALSE); $output .= theme('menu_item', l(t('Run behavior attach'), '', array('attributes' => array('id' => 'gmap-debug-startup'))), FALSE); $output .= theme('menu_item', l(t('Shutdown map'), '', array('attributes' => array('id' => 'gmap-debug-shutdown'))), FALSE); $output .= theme('menu_item', l(t('Reboot map'), '', array('attributes' => array('id' => 'gmap-debug-reboot'))), FALSE); return array( 'subject' => t('GMap Debug'), 'content' => theme('menu_tree', $output), ); } } } /** * Implementation of hook_perm(). */ function gmap_debug_perm() { return array( 'debug GMap', ); } /** * Implementation of hook_menu(). */ function gmap_debug_menu() { $items['gmap_debug'] = array( 'type' => MENU_NORMAL_ITEM, 'title' => 'GMap Debugging', 'access arguments' => array('debug GMap'), 'page callback' => 'gmap_debug_page', ); $items['gmap_debug/overview'] = array( 'title' => 'Overview', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); $items['gmap_debug/map100'] = array( 'type' => MENU_LOCAL_TASK, 'title' => '100 Marker', 'access arguments' => array('debug GMap'), 'page callback' => 'gmap_debug_map_page', 'page arguments' => array('100'), ); $items['gmap_debug/map1000'] = array( 'type' => MENU_LOCAL_TASK, 'title' => '1000 Marker', 'access arguments' => array('debug GMap'), 'page callback' => 'gmap_debug_map_page', 'page arguments' => array('1000'), ); $items['gmap_debug/map10000'] = array( 'type' => MENU_LOCAL_TASK, 'title' => '10000 Marker', 'access arguments' => array('debug GMap'), 'page callback' => 'gmap_debug_map_page', 'page arguments' => array('10000'), ); return $items; } function gmap_debug_page() { return '