I\'ve recently been doing development upgrading our maps to v3 and during development I was using my own personal key. Everything was working fine. When it was time to go to
I had a number of reports from clients about problems with Google maps on their sites. I checked and got "Invalid key" errors.
Strangely, Google used to give out keys with a space before and after the API key. In the past, when I left the spaces off, the key broke. It was frustrating to remember to leave those spaces.
Now, I trim()
my current API Key (with or without spaces) before submitting it to Google Maps and it works.