function gmap_get_key in GMap Module 5
Same name and namespace in other branches
- 6.2 gmap.module \gmap_get_key()
- 6 gmap.module \gmap_get_key()
- 7.2 gmap.module \gmap_get_key()
- 7 gmap.module \gmap_get_key()
Retrieve the Google Maps key that is in use for the site.
3 calls to gmap_get_key()
- gmap_geocode in ./
gmap.module - Utility function to use the google maps geocoder server side. This is an easy, quick way to geocode a single address. Note: This is a REMOTE CALL TO GOOGLE. Do NOT use this where performance matters, as it could possibly take several seconds for this…
- theme_gmap in ./
gmap.module - Gmap element theme hook
- _gmap_doheader in ./
gmap.module - Set up the HTML header for GMap. If you are going to include a custom JS file that extends GMap, you probabaly want to call this first to ensure that the core js files have been added.
File
- ./
gmap.module, line 1195 - GMap -- Routines to use the Google Maps API in Drupal.
Code
function gmap_get_key() {
$key = variable_get('googlemap_api_key', '');
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;
}