You are here

function leaflet_help in Leaflet 7

Implements hook_help().

File

./leaflet.module, line 13

Code

function leaflet_help($path, $arg) {
  switch ($path) {
    case 'admin/help#leaflet':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Leaflet module provides integration with Leaflet, the modern open-source JavaScript library for mobile-friendly interactive maps.') . '</p>';
      $output .= '<p>' . t('The module provides a field formatter that can show a map for fields that contain geospatial data.  It includes Views integration that plots data on a map (using the sub module Leaflet Views) and an API for displaying data on a map. For more information, see the online documentation for the <a href="@leaflet">Leaflet module</a>.', array(
        '@leaflet' => 'http://drupal.org/node/1645460',
      )) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Field Formatter') . '</dt>';
      $output .= '<dd>' . t('Leaflet includes a field formatter that makes it possible to show geospatial data (for example longitude and latitude) on a map.  You can use tokens instead of static text for Popups that use the Leaflet field formatter.') . '</dd>';
      $output .= '<dt>' . t('Views Integration') . '</dt>';
      $output .= '<dd>' . t('You can have maps on node displays and maps on views displays, thanks to Views integration. The process is very similar to adding and setting up a plugin on Views.  To render a map using Views, enable the included module Leaflet_views.') . '</dd>';
      $output .= '<dt>' . t('Leaflet API') . '</dt>';
      $output .= '<dd>' . t('Rendering a map is as simple as calling a single method, leaflet_render_map(), which takes 3 parameters $map, $features, and $height.') . '</dd>';
      return $output;
  }
}