Google has released its Maps API. I’ve had a play and produced this map which marks the birthplaces of four generations of my ancestors.
(I couldn’t get the JavaScript to work properly directly so I’ve had to imbed it in an IFRAME element. Any suggestions for getting the code to work loads from a JavaScript file directly into this post would be welcome.)
When I’ve got more time, I’ll play with the icons and the XML source data with the aim of highlighting differernt branches of my family tree (or different generations) with different coloured icons.
I believe that WordPress is inserting <br /> in the code where you have new lines.
It is. However, to combat that I moved code to an external .js file as advised here. I got no errors but an empty div.
OK my previous post should have had some , but wordpress removed them.
Some symbols? I think I fixed it.
I found this article on how GoogleMaps crashes IE helpful.
The trick is to put most of the javascript at the absolute end of the page.
Martin
Thanks. I could see that working with a custom template WordPress page, but would it work with the script inside a post?
The map shouldn’t work on the archive page anyway as the directory doesn’t match the one for which I registered my key. I’m wondering if I had simple permalinks enabled when I tried this originally.
Will,
Ah.. I hadn’t realised you’d done it that way. I couldn’t make it work inside a post so I ended up writing a template for the Ming map. I vaguely recall having to change the header as well.
Just looking around to see if anyone else had done this, and I have only found you and I so far 🙂 I plotted my ancestors too. How did you get it to work inside your blog? Do you host the blog on your own server?