You are here

function gmap_get_icondata in GMap Module 7.2

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

Get the JSON icon data for all the default markers.

@todo move this to GmapMarkerInfo class

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

File

./gmap.module, line 1156
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) {
    module_load_include('inc', 'gmap', 'gmap_markerinfo');
    $icons = _gmap_get_icondata();
  }
  cache_set('gmap_icondata', $icons, 'cache');
  return $icons;
}