Problem: We maintain separate dev, test and production instances of our sites:
samplesite.dev - a localhost development site
samplesite.test.ourcompany.com - an internet-facing test site
samplesite.com - the client's production site
Because each has a separate domain name, the Google map API key is different for each instance. Since the API key is saved in variables table of the database by default, in the past we would manually update the API key at http://whicheverURL/admin/settings/gmap after pushing the database from dev to test to production.
There are a number of ways to handle this. You could write a script that runs as part of your deployment process that updates the API key in the variables table, or use the Keys module.
Another solution that we've found was to override the API key value in our settings.php file.
At the bottom of the settings.php file, you will find the following section to override variable settings:
/**
* Variable overrides:
*
* To override specific entries in the 'variable' table for this site,
* set them here. You usually don't need to use this feature. This is
* useful in a configuration file for a vhost or directory, rather than
* the default settings.php. Any configuration setting from the 'variable'
* table can be given a new value.
*