John Hawkins
john.Information john.Journal

Dr John Hawkins

Welcome to my bit of the Maison de Stuff, home to a huge load of pictures, and my daily blog.

My email address is as above - I've put it in an image in a vein attempt to reduce the amount of spam I get.

John's Journal / Blog
Main Index
John's Pictures
Main Index
Main Index (text only)
Recent Updates
John's Travel
Main Index
Other Related Sites:
Maison de Stuff


Posted on 2009/06/14 09:50:10 (June 2009).

[Friday 12th June]
Introducing LocTweet - my geotweeting app.

LocTweet screenshot.

A lot of the content on Twitter relates to a particular location - particularly when posted from a mobile device - for some random examples just search Twitter for the name of a city, restaurant or perhaps a famous monument.

However to date there doesn't seem to be a convention for how to tag a tweet with information about the location it relates to.

It occurred to me today that probably the simplest thing would be to have some kind of hashtag, followed by a latitude and longitude pair, inline in the message. I considered some possible alternatives like #loc or #gps or #at, but after a bit of searching on Twitter I discovered there were already a handful of people using #ll (latitude and longitude) - presumably because of this page by @vladocar. The #ll tag was appealing - it was nice and short, and didn't seem to conflict with anything else in particular.

It's kind of awkward to generate those #ll tags though - to start with it meant zooming around on Google Maps and copying the latitude and longitude out of the URL. So Loctweet has three ways to help you do this:

1) If you click on "My location" loctweet will use Google Gears and/or the new HTML5 Geolocation API (available on iPhones with the 3.0 update and Firefox 3.5) to get your current location. It'll zoom the map there, and there's a handy text box above the map which will contain a hash tag for your current location.

2) Sometimes of course you might not want to use your current location (or maybe automatic location detection doesn't work for you) so you can still zoom around on the map to your heart's content to find a location you want to tweet about. Again, the text box above the map will update automatically to give the hash tag for the current central point of the map.

3) Thanks to the new local search control in the Google Maps API, you can also search for towns, cities, addresses, postal codes or places in the map - just as you would on Google Maps normally. It's in the bottom left hand corner of the map. Again, the hashtag above the map will be updated accordingly.

All of the above methods will update the text box with the hash tag in it. You can then either just copy and paste this, or try clicking the "Tweet from here!" link. This will open up, and, assuming you were logged in, will start a new tweet for you with the hashtag in it. You can then enter the rest of your tweet as normal. It doesn't matter where the #ll tag appears in the tweet - start, middle or end, it's up to you.

In addition to that, Loctweet will show other people's geotweets on a map. It retrieves Tweets with the #ll tag from Twitter using Twitter's excellent search API, and caches them to avoid having to query Twitter too often. As you zoom around on the map, it'll show you the 50 most recent geotweets in the current area of the map you're looking at. It also auto-refreshes once a minute so you can see geotweets appearing in almost real time.

Geotweets don't have to just be about what you're doing right now in your current location. I setup a couple of example Twitter users to demonstrate this:

geotwag A series of interesting geotagged "factlets" about countries around the world.

moreliff A homage to Douglas Adams and John Lloyd's masterpiece The Meaning of Liff.

Have fun geotweeting!

Post a comment