The questions are at the end feel free to skip down there if you know anything about gps.

I spent quite a while over a year ago messing with the google maps api. eventually I made an interface for creating maps, uploading photos and placing them on the map. This gave me a lot of fun, but I found it too time consuming for children to use.
The earlier this year Google My Maps came out which was a lot neater than my effort, and I’ve used it a few times, mostly pasting in the links flickr provides to add photos.

Cort-ma-Law from Lecket hill This week I stared another one with a few photos from a walk.
I was a bit frustrated about placing the photos on the map as I found it hard to figure out where place where in the rather featureless Campsies.

Flickr map Sorry

I switched to using flickr own maps but found them it a bit slow (that might be my aging mac).
I found it even more difficult to get the photos placed with any accuracy on flickr maps, although the interface for adding and looking at the photos is very slick, especially when you grab a bunch of pictures and throw them on a single spot.
Perhaps I just do not go far enough so need to much detail on a map to make my walk look like a walk rather than a spot.

All this made me think about my previous experiments, especially as there was an article in macuser about using the flickr and google maps apis combined. I had just finished using phpflickr to make a community gallery so though this might be quite quick.

Unfortunately the macuser article relies on a flickr api flickr.photos.geo.getLocation which depends on you having placed the photo on the flickr map (I was beginning to go round in circles).

Then I remembered Adam Burt‘s Applescript for getting geo tags from Google Earth ready for pasting into flickr. Adam does amazing things with blogs, google Earth/maps and geoblogging.
The appleScript copies to the clipboard geo tags of the location showing on google earth at that time.
It is much easier to figure out where you are on google earth, it has a smoother gui than google maps and a better resolution (of where I was at least). so I geotagged a bunch of photos, grabbed a new google maps API key and got busy.

Flickr googlemap mashup

Of course at that time I didn’t know about flickr.photos.geo.getLocation depending on flickr maps.And I didn’t know a tag geo:lon=-4.704382114809 would be returned from the API as machine_tags=”geo:lon=4704382114809 geo:lat=56258859999999″ ie without the minus sign or point so I spent a fair bit of time staring at a blank map, as the google maps API didn’t understand what I was sending to it. Anyway to cut a very long afternoon short, I delved deeper than I had been before into the data returned from flickr.photos.getInfo and finally clunked together a couple of files, the first uses phpflickr to grab the info from flickr and store it in a file, the second pulls that info using the google maps api and create a map.
I did try pulling the information and creating the map all at once, but that took too long. The data from flickr obviously does not need to be updated very often so that job was hived off, speeding up the maps creation. The unfinished product is here: John’s Flickr Map Mashup.

This is just scratching the surface of what could be done, it would be better maybe to create different maps for different days or for particular tags. if all of my tagged photos go on the same map it might eventually be too crowded and need some pagination.

Help wanted: I’d like to know a bit more about geo tagging and perhaps GPS:

  1. Would it be possible to get data from a GPS device and add it to the EXIF data of a photo before uploading it?
  2. Does Flickr undersatand embeded gps data?
  3. Is there a cheap enough GPS device that would work with a mac?

I am thinking of a work flow that includes the tagging of photos before uploading, maybe in iphoto with AppleScript or a SuperCard project, I think I’ve done some EXIF data extracting so imagine that adding can’t be that much harder.

Any ideas that do not involve a lot of expense gratefully received.