You are here

function gmap_get_marker_titles in GMap Module 5

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

Get the list of marker titles.

4 calls to gmap_get_marker_titles()
gmap_regenerate_markers in ./gmap.module
Regenerate the markerdata file.
gmap_taxonomy_form_alter in ./gmap_taxonomy.module
Implementation of hook_form_alter().
process_gmap_markerchooser in ./gmap.module
Marker chooser #process function.
process_gmap_overlay_edit in ./gmap.module
Overlay editor #process function.

File

./gmap.module, line 992
GMap -- Routines to use the Google Maps API in Drupal.

Code

function gmap_get_marker_titles($reset = FALSE) {
  static $titles;
  if (!$reset) {
    if (is_array($titles)) {
      return $titles;
    }
    $cached = cache_get('gmap_marker_titles', 'cache');
    if (!empty($cached)) {
      $titles = unserialize($cached->data);
      if (is_array($titles)) {
        return $titles;
      }
    }
  }
  require_once drupal_get_path('module', 'gmap') . '/gmap_markerinfo.inc';
  $titles = _gmap_get_marker_titles();
  cache_set('gmap_marker_titles', 'cache', serialize($titles));
  return $titles;
}