You are here

function gmap_location_menu in GMap Module 5

Same name and namespace in other branches
  1. 6.2 gmap_location.module \gmap_location_menu()
  2. 6 gmap_location.module \gmap_location_menu()
  3. 7.2 gmap_location.module \gmap_location_menu()
  4. 7 gmap_location.module \gmap_location_menu()

Implementation of hook_menu().

File

./gmap_location.module, line 49
GMap Location module is a module to add some gmap funcationality based on location.modules information.

Code

function gmap_location_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'map/user',
      'type' => MENU_NORMAL_ITEM,
      'title' => t('User locations'),
      'access' => user_access('view user map'),
      'callback' => 'gmap_location_user_page',
    );
    $items[] = array(
      'path' => 'map/user/load',
      'type' => MENU_CALLBACK,
      'access' => user_access('view user map'),
      'callback' => 'gmap_location_user_point',
    );
    $items[] = array(
      'path' => 'map/node',
      'type' => MENU_NORMAL_ITEM,
      'title' => t('Node locations'),
      'access' => user_access('view node map'),
      'callback' => 'gmap_location_node_page',
    );
    $items[] = array(
      'path' => 'map/node/load',
      'type' => MENU_CALLBACK,
      'access' => user_access('view node map'),
      'callback' => 'gmap_location_node_point',
    );
    $items[] = array(
      'path' => 'admin/settings/gmap_location',
      'type' => MENU_NORMAL_ITEM,
      'title' => t('GMap Location'),
      'access' => user_access('administer site configuration'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'gmap_location_admin_settings',
      ),
      'description' => t('Configure GMap Location settings.'),
    );
  }
  return $items;
}