You are here

function getlocations_load_location in Get Locations 7

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

Function to fetch a location

Parameters

int $lid Location Identifier:

Return value

array $location

3 calls to getlocations_load_location()
getlocations_getinfo in ./getlocations.module
getlocations_lids in ./getlocations.module
Page callback: Displays a map.
getlocations_search_load_all_locations in modules/getlocations_search/getlocations_search.module

File

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

Code

function getlocations_load_location($lid) {
  $getlocations_defaults = getlocations_defaults();
  $location = '';
  if (module_exists('getlocations_fields')) {
    $location = getlocations_fields_load_location($lid);
    $type = getlocations_get_type_from_lid($lid);
    if (!isset($location['marker']) || empty($location['marker'])) {
      $location['marker'] = $getlocations_defaults[$type . '_map_marker'];
    }
  }
  elseif (module_exists('location_cck')) {
    $location = location_load_location($lid);
    $location['marker'] = $getlocations_defaults['node_map_marker'];
  }
  return $location;
}