You are here

function gmap_get_icondata in GMap Module 6.2

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

Get the JSON icon data for all the default markers.

2 calls to gmap_get_icondata()
gmap_admin_settings in ./gmap_settings_ui.inc
@file GMap settings form.
gmap_regenerate_markers in ./gmap.module
Regenerate the markerdata file.

File

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

Code

function gmap_get_icondata($reset = FALSE) {
  static $icons;
  if (is_array($icons) && !$reset) {
    return $icons;
  }
  $icons = cache_get('gmap_icondata');
  if ($icons) {
    $icons = $icons->data;
  }
  if ($reset || !$icons) {
    require_once drupal_get_path('module', 'gmap') . '/gmap_markerinfo.inc';
    $icons = _gmap_get_icondata();
  }
  cache_set('gmap_icondata', $icons, 'cache');
  return $icons;
}