You are here

function gmap_get_icondata in GMap Module 5

Same name and namespace in other branches
  1. 6.2 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_regenerate_markers in ./gmap.module
Regenerate the markerdata file.
_gmap_admin_settings in ./gmap_settings_ui.inc
@file GMap settings form.

File

./gmap.module, line 1018
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 = unserialize($icons->data);
  }
  if ($reset || !$icons) {
    require_once drupal_get_path('module', 'gmap') . '/gmap_markerinfo.inc';
    $icons = _gmap_get_icondata();
  }
  cache_set('gmap_icondata', 'cache', serialize($icons));
  return $icons;
}