Google Maps API and that last post
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"
robert on March 18, 2007
hi all. nice blog. its very ineresting article.
domai on April 6, 2007
domai like that
passtest on May 9, 2007
How to pass a drug test ? Answers – http://pass-a-drug-test.org
Jons on May 9, 2007
hi
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!
xwmiwer on December 23, 2006
Hi all!!! Cool site!!!