For google maps api v3, the key must be empty for it to work in localhost. Older version key check is skipped for http://localhost/. You could use the key that you intend to use on your live domain, or anything else.
If you use a port number with localhost, then you can obtain a key for
“http://localhost:1234″.
Hope this help.
What do you think?