You are here

function getlocations_setup_map in Get Locations 6

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

Function to setup the map scripts

Parameters

$defaults: Required. the current settings. Sets up the call to googlemaps, css and the relevant getlocations js in html head

2 calls to getlocations_setup_map()
getlocations_setlocations in ./getlocations.module
Set up javascript settings and map
template_preprocess_getlocations_view_map in ./getlocations.views.inc
Preprocess function for theme_getlocations_view_map().

File

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

Code

function getlocations_setup_map($defaults) {
  static $getlocations_mapid;
  if (!isset($getlocations_mapid) || empty($getlocations_mapid)) {
    $getlocations_mapid = 0;
  }
  $getlocations_mapid++;
  getlocations_setup_js($defaults);

  // Generate unique Map ID.
  $mapid = 'key_' . $getlocations_mapid;
  return $mapid;
}