You are here

function getlocations_get_icondata in Get Locations 7.2

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_get_icondata()
  2. 6 getlocations.module \getlocations_get_icondata()
  3. 7 getlocations.module \getlocations_get_icondata()

Get the JSON icon data for all the default markers. adapted from gmap

3 calls to getlocations_get_icondata()
getlocations_markerinfo in ./getlocations.module
Ajax callback provides data for marker colorbox
getlocations_regenerate_markers in ./getlocations.module
Regenerate the markerdata file. adapted from gmap
getlocations_tools_export_opl_form in modules/getlocations_tools/getlocations_tools.module
export getlocations markers to Openlayers

File

./getlocations.module, line 1818
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_get_icondata($reset = FALSE) {
  static $icons;
  if (is_array($icons) && !$reset) {
    return $icons;
  }
  $icons = cache_get('getlocations_icondata');
  if ($icons) {
    $icons = $icons->data;
  }
  if ($reset || !$icons) {
    module_load_include('inc', 'getlocations', 'getlocations.markerinfo');
    $icons = _getlocations_get_icondata();
  }
  if ($icons) {
    cache_set('getlocations_icondata', $icons, 'cache');
  }
  return $icons;
}