You are here

function getlocations_load_location in Get Locations 6.2

Same name and namespace in other branches
  1. 6 getlocations.module \getlocations_load_location()
  2. 7.2 getlocations.module \getlocations_load_location()
  3. 7 getlocations.module \getlocations_load_location()
2 calls to getlocations_load_location()
getlocations_info in ./getlocations.module
getlocations_lids in ./getlocations.module
Menu callback

File

./getlocations.module, line 1215
Displays locations on a map. for Drupal 6 using version 3 googlemaps API

Code

function getlocations_load_location($lid) {
  $location = location_load_location($lid);
  if ($location) {
    if ($nid = getlocations_get_nid_from_lid($lid)) {
      $typemarkers = getlocations_get_markertypes('node');
      $type = getlocations_get_nodetype($nid);
      $location['marker'] = $typemarkers[$type];
    }
    elseif ($uid = getlocations_get_uid_from_lid($lid)) {
      $getlocations_defaults = getlocations_defaults();
      $location['marker'] = $getlocations_defaults['user_map_marker'];
    }
  }
  return $location;
}