Most geo mashups such as GeoMeme display Tweets and other geo-located content as points on a map, based on exact latitude/longitude coordinates. Easy.
At the inaugural Chirp Conference this week, Twitter released its Places feature which instead allows Tweets to be approximately geo-located, within a ‘Place’ of chosen granularity; a city, or a neighborhood, perhaps a restaurant or a park.
This is a great option for users who have ‘geo-privacy’ concerns about revealing an exact latitude/longitude.
However, this approach presents a challenge to developers on the Twitter platform: how can approximately-located Tweets be displayed on a map?
Moreover, users need app developers to adopt a standard way of showing these approximately-located Tweets on a map. A consistent approach by developers will help users form a consistent understanding of this Twitter feature, in a similar way that @anywhere Hovercards provide a consistent approach to showing data about a particular Twitter user.
polytweet is a javascript library which displays approximately-located Tweets on a Google Map.
I hacked it together at Chirp, because I will need something like this for GeoMeme, and also to share it with other developers and encourage a standard approach.
Exactly-located tweets are represented by a profile image atop a blue pin.
Approximately-located tweets are represented by a semi-transparent profile image, placed along one of the edges of the Place polygon, at a consistent position so that zooming in and out does not shuffle the tweets.
Here’s an example, with thanks to the Twitter API team for sharing their geo-location. The tweet on the left hand side from @raffi is approximately located:
Hovering over a marker will trigger the display of any corresponding Place as a semi-transparent polygon. Hence the user can understand the area from which an approximately-located tweet was posted:
You can see the working demo at http://bit.ly/polytweetdemo which includes an added bonus of Hovercards.
See the source code for usage instructions and details of how to tweak the style of the markers and polygons.
Enjoy!
LinkedIn