More on Google Maps API

In the previous post, a couple of people noted problems with the API. Just in case nobody realized this: the key that you use is tied to the website that the request comes from. You can’t simply copy my key and make it work, you need to apply to get your own.

Addendum: Hmmm. It appears that a warning may be produced when the header is used in directories which are more than one level deep in the hierarchy from the registered URL. I’ll have to check this out some more. I may have to disable this until I get it sorted out. Stay tuned.

Addedum 2: I was apparently right. The key is only useful for the directory in which it is generated, not subdirectories. Sigh. Whose bright idea was that? This means that if I embed maps into posts (as I did below) they won’t appear properly (indeed, will generate a Javascript error) when they are viewed in comments or archives.

More discussion.

2 thoughts on “More on Google Maps API

  1. Tomas Bridson

    Stumbled upon this site by Google looking for answers on embedding maps on my page and just wanted to say thank you for your help!

Comments are closed.