You are here

function gmap_get_key in GMap Module 7.2

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

Retrieve the Google Maps key that is in use for the site.

@todo move this to GmapDefaults class

1 call to gmap_get_key()
GmapDefaults::__construct in lib/Drupal/gmap/GmapDefaults.php
Do not change.

File

./gmap.module, line 1370
GMap -- Routines to use the Google Maps API in Drupal.

Code

function gmap_get_key() {
  $key = variable_get('gmap_api_key', FALSE);
  if (module_exists('keys_api')) {
    $key = keys_api_get_key('gmap', $_SERVER['HTTP_HOST']);
  }
  elseif (module_exists('keys')) {
    $key = keys_get_key('google_maps');
  }
  return $key;
}