By VeryCool78 on
I did succeed in making gmap api key support multidomains.
I want to share my experience with you and there for those are the steps I took to make it work.
1- I gusse you have gmap module installed.
2- Install keys module 6.x-2.0
3- To make it work you need to edit the function gmap_get_key() on gmap.module.
change those line
if (module_exists('keys_api')) {
$key = keys_api_get_key('gmap',$_SERVER['HTTP_HOST']);
}
to
if (module_exists('keys')) {
$key = keys_get_key(array('service' => 'gmap'));
}
4- Go to admin/settings/keys, start to add api keys for your domains, you will need to select Gmap (Google Maps API Key) as a service for each domain since you are using Gmap module.
That's all, enjoy.
Comments
Modification no longer needed
As of GMap 6.x-1.1, this modification is no longer needed as the module includes support for Keys 2.0 as well as the old Keys API module. See #676108: Keys version 1 is deprecated. Switch to version 2. for more information.
(Username formerly my full name, Richard Eriksson.)