May 08, 2005

Geotagging Flickr with Google Maps and Greasemonkey Part 2

UPDATE: Please note, this method no longer works

Ive come up with a method, that makes adding GeoTags to your Flickr images, and then submitting the images to the site a slightly more automated process.

if anyone wants to try it out heres what you need to do:

Automated(ish) GeoTagging Flickr Images Process

1) Firstly if you havent already, you need to install the Firefox web browser.

2) Secondly you need the Firefox Greasemonkey extension installed.
(N.B The scripts have now (27/5/05) been updated to be compatible with GM 0.3.3 thanks to Matthew Weymar! :) )

3) Install this greasemonkey script, which is for the site. (Installing GreaseMonkey scripts is as simple as clicking the link then going to Firefox's tools menu and selecting "Install User Script". Then accept the default options and click ok.)

4) Install this greasemonkey script, which is for

5) Go to the image on the website that you want to add GeoTags to.

6) You should see a new link next to the "add tags" link on the right, called "add GeoTags", click that link, and an input box will be displayed.

7) Enter the placename, streetname or postcode or zipcode or a combination, where you took the image (or any other location identification info that Google Maps will recognise) then click submit. Remember though that Google Maps only covers USA, Canada,UK + Republic of Ireland in great detail at present. (for people in areas not covered by google maps at present, ive created a new script) that utilises

8) You should now be redirected to a page with the Google Maps interface embedded in it.

9) Locate the position on the map you wish to get the geotag coordinates from, you can do this by any of the normal means, i.e searching with the search box, or dragging, zooming and scrolling the map. Also worth noting is "double clicking" anywhere on the map will recenter the map.

10) Once you have located the position you wish to GeoTag your image with, click the link on the right hand side that says "Add GeoTags to your flickr image"

11) You will then see a page with 2 buttons. below that should be a message saying "rsp: stat ok", if it says that, that means the geo tags have been added to your image successfully.

12) You can now choose whether to add the "GeoTagged" link to the images description, or as a comment. You can only add the link to the description if you are the images owner though, if you arent the owner, you can only add the link as a comment. Choose which method you want to use and click the appropriate button.

13) You should now be redirected back to your image page, and you can now check the tags etc have been added properly.

14) Finally click the "GeoTagged" link in the images description / comments, and then you are done, the geobloggers site should add your images location to its database.

Any Bug reports, suggestions and ideas on improving the process flow are most welcome.

Cheers :)


UPDATE Christopher and Dave have discovered that this method will not work unless you set the browser to accept "third party cookies". Thanks Guys.

FURTHER UPDATE: A guy called Mark has created a lovely visual step by step walkthrough of the process of adding GeoTags via this method.

*Yet another update* You can geotag the rest of the world, even though Google doent have the detailed maps, they do have a satellite view of the whole world, just not high resolution for anywhere apart from USA+Canada. If you want to geotag somewhere not covered in detail by Google Maps, try zooming all the way out from the map, and changing to satellite view, you should now be able to see the whole world if you move the map about.

Further Update At present have greater worldwide map coverage than google has, so I wrote some geotagging with scripts for people in countries not currently covered by google maps. You can get the geotagging scripts here.

Further Further Update 27-Jul-05 Ive written yet another new GeoTagging Flickr script, this one utilises the fabulous Google Earth. You can read about it here.

A GeoTagging Flickr Group has been started, for anyone wanting to discuss geotagging/geoblogging stuff.

Technorati Tags: | | | | | | | | | |

Posted by steeev to Cool Software | Cool Websites | Firefox | Flickr | GeoLocation | Google Maps Hacking | GreaseMonkey | Ocular Sweetitudes | Programming | Tutorials

at May 8, 2005 11:42 AM

it works, great job!!

Posted by: usbrit at May 8, 2005 01:02 PM

Only problem I'm having is on return to flickr after submit, get a page not found, but process has worked.

Posted by: usbrit at May 8, 2005 01:13 PM

hi usbrit, thanks for your comments, i think ive fixed the bug you are seeing now,

ive updated the file, download that and try it again, should work ok now :D

Posted by: steeev at May 8, 2005 03:20 PM

Thanks, fast work!

Posted by: usbrit at May 8, 2005 03:41 PM

Not working for me, dang. The "Add geotags to your flickr image" link is simply not appearing. (I'm on Firefox 1.0.2, fwiw.)

Posted by: Julian Dibbell at May 9, 2005 04:06 PM

same with me The "Add geotags to your flickr image" link is a no show

Posted by: snicker01 at May 9, 2005 04:53 PM

Awesome hacking Dude!! (plus you fulfilled my Lazy Web Request! )
Let the annotating and Tagging of the World Begin!

Posted by: Ian Irving at May 9, 2005 05:08 PM

Wow, great work. I think this will make geotagging easy enough to make it really catch on.

Posted by: ChicagoSage at May 9, 2005 06:13 PM

The "Add geotags..." is hidden because the google maps frame is too small. If you are using Firefox, you can right click on the frame, go to "this frame","open this frame in new tab". Then you can see the entire page with the links and all.

Posted by: christian at May 9, 2005 06:59 PM

could the people who are having problems seeing "the add geotags link" please let me know a little more information such as

1)screen resolution
2)operating system and version number
3)browser and version number

cheers :)

Posted by: steeev at May 9, 2005 09:11 PM

the "add geotags" link is not working for me. when clicked on nothing happens.

ff 1.0.3
gm 0.3b


Posted by: quiiver at May 9, 2005 09:14 PM

Sure, Steev, here's my info:

winxp 5.1
firefox 1.0.2

Posted by: Julian Dibbell at May 9, 2005 09:23 PM

heres the stats of the pc im testing the system out on:

resolution: 1024x768
os: win2000
ff: 1.03
gm: 0.2.6 (current version)

and it all works fine for me... :/ if anyone can isolate exactly what the problem is, i would be most grateful, and i could try and fix it, thanks for everyones help with this, i will try and investigate the problem further myself too.

one reason its not working for some people i guess is it wasnt developed for the bleeding edge 0.3b version of greasemonkey, i suppose i should have mentioned that in the original post. i think some of the code would need to be rewritten to work in that version.

Posted by: steeev at May 9, 2005 10:27 PM

i think i've figured out the problem -- at least a part of it, anyway.

fwiw, i'm on
res: 1024x768
os: mac osx 10.4
ff: 1.0.3
gm: 0.2.6

but what seems to have made the difference was my disenabling the "Flickr Profile Linker" script. once i did that, the add geotags link appeared as promised.

Posted by: matt at May 10, 2005 03:17 AM

i have also found that turning off butler seems to make the geotags link work on gmaps without having to open the map in a new tab (i.e., outside the frame).

Posted by: matt at May 10, 2005 03:25 AM

cool, glad you figured out the problem matt.

Posted by: steeev at May 10, 2005 07:53 AM

This links directly to which is for the US only.
Any chance of a version that goes to so that we can start geomapping good old blighty?

Posted by: 5imon at May 10, 2005 04:20 PM

5imon, im in the uk too, the application works fine for mapping the uk, for me anyway, what problem are you having exactly?

Posted by: steeev at May 10, 2005 04:39 PM

Would be nice if as part of wishlist (and possible migration to the Flickr API) address lookups could be used in addition to long/lat numbers to make things even simpler.

See my site for EG (warning slow):

Posted by: Joel at May 10, 2005 05:21 PM

I'm getting the following error when I try to add tags:

<rsp stat="fail">
<err code="99" msg="User not logged in."/>

I'm using Firefox 1.0.2 on Mac OS X Tiger. (And I *am* logged into Flickr.)

Posted by: alykat at May 10, 2005 07:16 PM

Alycat, thats strange. I guess it might be a cookie issue, though I cant be sure, I dont have a Mac OS X Tiger system to test it out on.

Is there anyone else out there with Macos Tiger experiencing the same problem?

Posted by: steeev at May 11, 2005 07:33 AM

its great! very simple to use. great job

Posted by: wiphey at May 12, 2005 01:34 AM

I'm on Tiger and I'm having the same symptoms as alycat. I solved it by turning off the cookie preference to only allow cookies from the "originating website only." I don't like having this disabled, but I can deal with it durin geotaggin sessions, I suppose.

Posted by: Christopher Holland at May 12, 2005 05:48 AM

Cheers Wiphey! and thanks also to Christopher, for diagnosing the problem and finding the solution to the Mac OS problem :)

Posted by: steeev at May 12, 2005 08:10 AM

It's not just a Tiger problem, I have it on XP too - it's only if you have that cookies from "originating website only" setting turned on in Firefox.

Posted by: Dave Arquati at May 13, 2005 02:27 PM

Thanks for the info Dave.

Posted by: steeev at May 13, 2005 02:53 PM

Dont forget It allows you to import your Flickr photos (or upload them directly) and geotag them. The site does a good job of displaying them on a map and letting you search photos based on location.

Posted by: Jake at May 13, 2005 08:14 PM

try doing a search for london on geosnapper:

hmmm interesting results ;)

Posted by: steeev at May 13, 2005 08:22 PM

The script broke with a recent change to the flickr javascript. ps_photo_id is no longer a global variable. There is a photo_hash with one element (the photo) as a key, but I don't know how to access that object. You might look into updating your code.

Posted by: Christopher Schmidt at May 15, 2005 04:15 PM

christopher, thats old news mate, it happened on the 13th and i updated the script the same day ;-)

Posted by: steeev at May 16, 2005 07:38 AM

I can't get the input box to show when I click "Add Geotag". Cookies are set to be accepted from all sites, tried restarting Firefox, upgrading to 1.0.4, and GM is the latest (0.3.3), too.

I'm running Tiger, on a G3 iBook with 1024x768. I *do* have a CTA Google maps plugin installed, will try uninstalling.

Posted by: Andy at May 16, 2005 01:42 PM

Uninstalling the CTA maps plugin didn't help :(

Posted by: Andy at May 16, 2005 01:44 PM

you need to use greasemonkey 0.2.6 for it to work

Posted by: steeev at May 16, 2005 02:09 PM

Cool - thanks. I just read 0.2.6 to have an implied "or later" - I'll try again. Sounds like a cool plugin...

Posted by: Andy at May 16, 2005 04:28 PM

This is quite possibly the coolest thing I've seen all month. Kudos!

Posted by: Mark J at May 17, 2005 08:17 AM

Great extension - perhaps with your increased knowlege of the globe you'll know that Google maps also covers the Republic of Ireland currently as well as the UK.

Posted by: markos at May 17, 2005 01:53 PM

@Mark J: Cheers mate! :D

@markos: hehe, i didnt know that, thanks for the info :)

Posted by: steeev at May 17, 2005 02:05 PM

So when are you going to add Australia? We have a postcode system. This seems like a photographic version of geocaching []. Any chance of being able to put in the coords manually?

Posted by: GeoWombats at May 18, 2005 02:07 PM

@GeoWombat: The only limitation on map coverage is due to and the countries that they cover at the moment, which is quite limited.

BTW You can put in coordinates manually already, see the site for details.

Posted by: steeev at May 18, 2005 03:36 PM

I'm no Greasemonkey guru, but instead of adding the link to to the description or in a comment, couldn't you add it as a link next to the "geotagged" tag using Greasemonkey? That would eliminate a step and eliminate the need to manually erase the link in the description for people who are bothered by it. Any reason that wouldn't work?

Posted by: Mark J at May 19, 2005 06:19 AM

@Mark J: Yes this would be doable, though the "geotagged" link serves a purpose, not everyone uses GreaseMonkey, in fact im sure its a very small percentage of the Flickr userbase. The geotagged link connects the flickr image back to, and shows the flickr user whereabouts on the map the image was taken, and also other images that were taken in the same vicinity.

If the user doesnt want the geotagged link in their description, they dont have to add it at all, as the geobloggers site should pick up the image via the "geotagged" tag rss feed, and eventually it should use the API to pull the images in, which should be more accurate. Or if they like they can add the link to a comment instead of the description. Though personally i think its a bit of a waste of time adding the geotags to the image, if you are not going to have the link to the geobloggers site as well.

I was actually thinking of adding a "geotag/ged" button to the DHTML toolbar above the image on flickr for the greasemonkey script users. ive got so far as designing the button, but havent got round to getting the DHTML button behaviour working yet.

Posted by: steeev at May 19, 2005 07:41 AM

steeev, Ah... I was thinking that the link only served a temporary purpose of notifying Geobloggers about the geotagged photo... I wasn't thinking about other people clicking the link.

Posted by: Mark J at May 20, 2005 12:41 AM

Looks interesting.

Any chance of making this work with GM 0.3? I'd like to be able to play with it, but I have no disire to dowgrade my GM.

Posted by: wintermute at May 22, 2005 11:44 PM

This script was working fine when I started using it this morning at work over the Ethernet network. Now, at home on my WLAN I get:

When I click the 'add geotags...' link. I'm using Firefox 1.0.4, Greasemonkey 0.2.6 all on WXPPro+SP2.

Posted by: Tim Sewell at May 23, 2005 07:58 PM

See above^ Meant to say I get the following:



Posted by: Tim Sewell at May 23, 2005 08:00 PM

Fantastic stuff, thanks (though I'll cheekily second the call for compatability with the latest Greasemomnkey...)

Posted by: Jack at May 24, 2005 03:08 PM

Well, I seem to've fixed these scripts for GM 0.3.4.

You may check them out at: and

Changes were:
Moved everything inside (function(){ code })();
- function foo(bar)
- foo = function(bar)

I'm not sure, frankly, whether or not this last bit was necessary, but it works.

Feedback not only welcome, but appreciated.

Posted by: Matthew Weymar at May 24, 2005 04:32 PM

Hmmm, I tried to use these scripts for the first time today and reached this page ( which suggests that the feature is now broken and unlikely to be fixed. How very sad.

Posted by: Sapientum at May 25, 2005 03:46 PM

Hey Steve, I can now see all your images online through Google. Does that mean that you and they are on speaking terms again?

Posted by: Sapientum at May 25, 2005 06:56 PM

And now, not only is the Flickr script not working, but the GMaps script's not working either. Has Google updated its map API?... No time to pursue this now, but curious....

Posted by: Matthew Weymar at May 26, 2005 03:02 PM

OK, I'm guessing this probably *isn't* a GMaps API issue.

Going straight to and clicking Show Lat+Long shows: geotagged geo:lat=37.062500 geo:lon=-95.677068

Clicking and dragging the map to recenter it, and clicking Show Lat+Long again shows a new set of lat's and lon's.

So far so good.

If I enter "new york city," however, and click Show Lat+Long again, the lat's and lon's do NOT update.

Is this something I broke in updating these scripts for GM 0.3.4? perhaps, by bringing the "Globals" sfpointcount & sfpointlist *inside* (function(){ code })();?...

Even having messed with it, I admit, I don't know the code well enough to diagnose this without spending more time on it than I have right now.

Steve, any interest in looking at what I've done to update your scripts for GM 0.3.4 and fixing it up for the problem I describe above?...

Also, any interest in bring the Flickr script back to life?... Or is this a dead issue?


Posted by: Matthew Weymar at May 26, 2005 03:19 PM

matthew, it looks like google has updated the code on their site in some way, which has caused the greasemonkey script to stop working correctly, i tried an older version of the script, and its getting the same problem, so its got to be a change on their side i reckon.

im going to start work on reviving the scripts, thanks for updating the scripts to work with the latest greasemonkey btw. at present ive still got the older version of GM, cos ive got a few scripts that i still need to update. will try to get this working for the older version first, then it shouldnt be too hard to convert it to the newer version with the help of your scripts as a guide, cheers mate! :)

Posted by: steeev at May 27, 2005 01:02 AM

Hey guys!

maybe you would dig

this hack:

It lets you extract the tiles from google maps and stitches them together to create extraordinarily large maps!

Posted by: Noah Vawter at June 2, 2005 07:17 AM

Hi Steeev,

I am getting an error message:

Notice: Undefined index: auth_hash in /home/sites/steeev/www/public_html/flickr/addgeotags.php on line 48

when I select the Add Geo Tags link.

I am using Greasemonkey 0.3.3 with Firefox 1.0.4.

Any clues?

Posted by: Sapientum at June 8, 2005 11:04 PM

hi sapentium,

this error can occur if you havent updated the greasemonkey scripts, have you got the latest versions? (they are at the same URL in the article above)


Posted by: steeev at June 8, 2005 11:23 PM

This works great. Thank you all for producing this. It has helped me out a lot.

Posted by: Randy M. Franklin, Jr. at June 12, 2005 08:58 PM

I'm getting "fail" because "photo not found."

Posted by: michelle at June 14, 2005 05:14 AM

I can't get this to work on my Mac. Is it PC only?

Posted by: mphoenix at June 24, 2005 04:13 PM

mphoenix, it should work on a mac, you might need to "allow 3rd party cookies" in firefox in order to get it to work though.

Posted by: steeev at June 28, 2005 12:29 AM

michelle: reasons for "fail not found" could be you are no longer logged into flickr or the photo is marked as private.

Posted by: steeev at June 28, 2005 12:30 AM

I absolutely love this script - amazing job! I have it installed on two computers, but it only works on one for some reason. I'm getting the

err code="99" msg="User not logged in."

message and I don't know why. Cookies aren't set to 'originating website only'. I'm using GM 3.3.

Any ideas?

Posted by: Matt Schneider at July 13, 2005 03:18 AM

That was it! There was indeed a checkbox in Zone Alarm that was blocking 3rd party cookies - I guess I never had cause to notice it before now. Thanks a lot - you made my day! Let the geotagging resume...


Posted by: Matt Schneider at July 14, 2005 03:00 AM


Sorry for being such a noob, but I don't understand steps 5 and 6. What is goto do with google maps?

Please explain these steps to me. Do I need to register with flickr?

A big thank you in advance.

Posted by: HelpMe Pls at July 14, 2005 08:12 PM

michael, yes this whole process requires you to have a account, that the whole point of the exercise :)

Posted by: steeev at July 19, 2005 01:57 PM

This is a very nice set of scripts! Thanks for putting them together!!!

- Wired Dude Dave

Posted by: Wired Dude Dave at July 25, 2005 05:03 AM

Hmmmmm the Add GeoTags link isn't showing up for me anymore.... did Flickr change something in their document model that broke this script?

Posted by: Jason at August 2, 2005 03:25 PM

youve probably got a script conflict, you can only run one of my geotagging scripts that work on at a time, so you might want to check that out. one way to check if theres any javascript problems is to type "javascript:" in the URL address bar, that will open the javascript console up, and it will show any javascript errors that are occuring.

Posted by: steeev at August 2, 2005 06:13 PM

Thanks for putting this great tool together. I plan on using it with some of my students during the coming school year.... Thanks again...

Posted by: Tim Lauer at August 19, 2005 06:16 PM

this is a pretty good hack man. tnx alot :)

Posted by: zoran at August 31, 2005 09:37 PM

great! now its much easy to doit.
this one was already done with the script:

Posted by: jorgempf at September 18, 2005 01:05 AM

Oh wow... super awesome easy cool script. I love it! Now I'm going to kill hours going back and tagging as many of my old pics as I can remember locations for! Thanks, thanks, thanks.

Posted by: jacqueline-w at October 10, 2005 06:26 PM

This looks like great work. Unfortunately, while the Add GeoTags link shows up for me, clicking on it simply causes the page to reload. The Javascript Console shows the following error: "displaylocationfield is not defined"

I suspect that the problem is that I'm running Firefox 1.5b2 and Greasemonkey 0.6.2.

Posted by: jacob at October 11, 2005 05:19 PM

Very cool script. thanks for sharing. works fine in OS X, Panther, FireFox. Gotta love cool platforms, metadata and good scripters!

Posted by: Dave at October 15, 2005 09:34 PM

Do you have updates for your scripts for ff 1.5B2 and greasemonkey 0.6.2, or 0.6.3?

thanks :)

Posted by: david at November 1, 2005 04:47 PM

would love to see it updated for ff 1.5 and greasemonkey 0.6.4! ;)

Posted by: david at December 16, 2005 03:38 PM

Hi...I can't seem to get the script to work - the Add GeoTags button appears but when click on it nothing happens. What can i do?

Posted by: Dan Hammond at December 21, 2005 12:50 PM

Pleeease update for ff 1.5! This script is the one thing I miss from before I upgraded

Posted by: Eddie at December 21, 2005 06:30 PM