Subscribe RSS
Plotting my tree with Google Maps Jun 30

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.


8 Responses

  1. 1
    Ryan 

    I believe that WordPress is inserting <br /> in the code where you have new lines.

  2. 2
    Will 

    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.

  3. 3
    Ryan 

    OK my previous post should have had some , but wordpress removed them.

  4. 4
    Will 

    Some symbols? I think I fixed it.

  5. 5
    Martin Tod 

    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

  6. 6
    Will 

    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.

  7. 7
    Martin Tod 

    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.

  8. 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?