Biers was where the undead drank. And when Igor the barman was asked for a Bloody Mary, he didn't mix a metaphor - Terry Pratchett, Hogfather


Fun with Google Maps + Google Earth!

Thursday 2nd February, 2006 | 12:29 pm

I knew setting up Coppermine to run my photo gallery would lead to tinkering, and browsing through the Coppermine forums brought me to a rather interesting hack - integrating your photos with Google Maps and Google Earth.

It’s fairly straightforward to configure, just time consuming (but well worth it!) to go through selecting the location on the map for each of your photos. Also, I’m now looking at breaking it down to provide maps only for certain albums, such as my Macbackpacking tour of Scotland, or our road trip planned for the summer.

So, be a little patient whilst all the data loads when selecting the first link to display the maps, and remember you’ll need Google Earth installed for the second link ;)

All credit to TranzNDance for these two excellent hacks. If you want to give this a go yourself, read through integrating with Google Maps and integrating with Google Earth from the Coppermine forums.

    4 Responses to “Fun with Google Maps + Google Earth!”


  1. Gravatar Thu (2 comments)
    United States | Mozilla Firefox 1.5.0.1 | Windows XP
    March 5th, 2006 at 6:33 am

    I’m glad you like the mods. :)

    Is it just me or does the map not show up in Firefox (1.5)? In IE, it’s floating in an odd location… I’m wondering if the number of items is more than the map can handle?

    I think I found out the issue… there is no css info for the map as described here: Coppermine forums post - GoogleMaps integration

    I added the CSS dynamically and the map showed up in FF. I see that the css id I used for the sidebar conflicts with the blog sidebar, so I’ll rename it so it’s more specific.

    Thu (aka TranzNDance)

  2. Gravatar fouldsy (63 comments)
    Great Britain (UK) | Mozilla Firefox 1.5.0.1 | Linux
    March 5th, 2006 at 12:21 pm

    Thu - thanks a lot!

    I (quite brutally!) hacked the Coppermine 1.3.x Kubrick theme to work with CPG 1.4.x - see http://www.fouldsy.com/?p=225 - and to be honest hadn’t got around to geting the GoogleMaps section back up and running. I figured it was just down to some CSS issue, as it just wasn’t recognising the side bar at all.

    But, I’ve now made the CSS changes you suggested, modified the main script to point to the new gmap_siderbar CSS style, adjusted the sizing a little bit so it all fits, and it works perfectly again now - http://www.fouldsy.com/gallery/googlemaps.php

    The sizing of the thumbnail sidebar is a little off under IE, though amazingly I only have about 15% of visitors running IE according to Google Analytics!

  3. Gravatar Thu (2 comments)
    United States | Mozilla Firefox 1.5.0.1 | Windows XP
    March 5th, 2006 at 4:40 pm

    Yay! I’m glad I could help. :) It was also a good thing for me to be made aware of the css id conflict. It’s cool to see the api can handle so many entries. Great job with the theming and putting in all those coordinates for those files so we can see all the different places you took the photos. :)

  4. Gravatar fouldsy (63 comments)
    Great Britain (UK) | Mozilla Firefox 1.5.0.1 | Linux
    March 5th, 2006 at 5:12 pm

    Thanks, hopefully your updates on the forums will help others in similar problems with conflicts in CSS naming schemes.

    As for the number of images, I think the code is more than efficient enough to handle it, it’s more the time in downloading that number of images into the sidebar. At the moment I’m looking at away for the initial page to show a drop-down list of available albums which you select and then have the code run off and display the appropriate points on the map. I’m expecting quite a few photos to be uploaded this summer, and don’t really fancy 300+ photos downloading for each page load!

Leave a Reply


If you must, please use valid XHTML
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>