This patch allows the use of Keys to manage the site's Google API Key. Keys provides an API for managing keys for other API's also allowing for sites that are developed on different servers than the live to have unique keys and allow modules to use the proper key based on the server host name.
This patch still allows for the Google Map API key to be entered in on the Gmap settings page, but can also be managed from Keys settings page. From the Keys settings page you can also add additional host name's and their appointed keys, or delete any key.
There are two patches, the first one included in this message and the second one to follow. Also, I did not patch the gmap.info file but 'dependencies = keys_api' needs to be added to it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | gmap_settings_ui.inc_.patch | 904 bytes | greenskin |
| gmap.module_0.patch | 1.79 KB | greenskin |
Comments
Comment #1
greenskin commentedHere is the second patch. I hope that this can find its way into the module in some form. Thanks.
Comment #2
Carlos Miranda Levy commentedI can confirm this works like a charm...
This is greatly needed by many of us pointing more than one URL to the same Drupal installation.
I can now start integrating my separate files and communities into one large Drupal powered / gmap enhanced happy family.
:)
Plsssss, pretty please, with a cherry on top, add this to the module's core code...
Comment #3
bdragon commentedI refuse to make gmap dependent on keys api, however, I am open to supporting it when available, either by telling keys api about our variable, or doing module_exists() calls where appropriate.
Comment #4
bdragon commentedLooking at the keys code, it seems the module_exists route will work the best. Give me a few.
Comment #5
bdragon commentedAdded support for keys api when available.
http://drupal.org/cvs?commit=87022
Please test the next snapshot.
Comment #6
greenskin commentedThis is a great idea not to require it but to have it has an option which is something I should have thought of when I wrote the patch. Thanks.
Comment #7
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
jcnventuraThis is actually a followup to another issue here (http://drupal.org/node/69465).
Correct me if I am wrong, but doesn't the Google maps API require a different key depending on the location of the page? So a page residing in www.example.com/print will require a different key than a page in www.example.com/content?
If so, the fact that this patch only supports getting a key per host, where it could be easy to associate the key to a complete host+path string, is somewhat a middle solution.
I am closing the other issue down.
Comment #9
bdragon commentedNo. You are most likely generating your key wrong. You should be generating it against your Drupal root folder.