Google Maps API and that last post

Posted on July 13, 2005, under general, meta.

As I’ve pretty quickly found out, the restrictions in the Google Maps API are fairly pants for any kind of map-blogging, or anything that uses dynamic url’s. The Google maps key is tied to a specific domain and “directory”. So; a map embedded at example.com/foo/ will work, but not www.example.com/foo/ or example.com/foo/bar/.

So, while you can see the map just fine if you go to http://www.stdlib.net/~colmmacc/, you can not see it from the permalink page, or in any RSS reader.

Uggh, why didn’t they just use a simple per-user key like the other Google API’s! Apparantly they are working on it. When it’s fixed I’ll make the change. In the meantime, I’ll see if I can use mod_rewrite to get around it.

Oh also, if you’re trying to make embedded Google maps default to satellite view there’s a bug in the API, instead of using:

1
        map.setMapType(G_SATELLITE_TYPE);

You have to use:

1
        map.setMapType(_SATELLITE_TYPE);

That took a while to find.

Update: Oh and it seems the embedded google map crashes IE, I’m impressed. Just use mozilla.

Update 2: Solved the problem a really nasty way. The google map is now embedded in its own html page, which in turn is embedded using an iframe. *shudder*, but it works.

13 Replies to "Google Maps API and that last post"

gravatar

xwmiwer  on December 23, 2006

Hi all!!! Cool site!!!

gravatar

robert  on March 18, 2007

hi all. nice blog. its very ineresting article.

gravatar

Medvedik  on March 30, 2007

gravatar

ebutin  on March 30, 2007

gravatar

Tom  on March 30, 2007

Amazing artwork! This is spectacularly done! Would you please also visit my site?

gravatar

Blair  on March 30, 2007

Your site looks great! Visit my sites, please:

gravatar

Gregory  on March 30, 2007

Very well! Your site is neat! Visit my sites, please:

gravatar

Steve  on March 30, 2007

Really nice and interesting website. Thank you a lot! Please visit my site too:

gravatar

domai  on April 6, 2007

domai like that

gravatar

passtest  on May 9, 2007

How to pass a drug test ? Answers – http://pass-a-drug-test.org

gravatar

Jons  on May 9, 2007

hi

gravatar

Lisa Onizuka  on October 14, 2007

Thank you so much for posting your solution for crashing IE embedded google map 0- that saved me a ton of time/headache I’m sure! If only everyone would switch to firefox!

Leave a Comment