Permalink
Browse files

Support for geocoding

  • Loading branch information...
1 parent 5958462 commit cbf181e899825ffc0df5cba75e6067797b658349 @elektronaut committed Nov 20, 2009
Showing with 16 additions and 4 deletions.
  1. +8 −0 README.rdoc
  2. +7 −3 jquery.livetwitter.js
  3. +1 −1 jquery.livetwitter.min.js
View
@@ -36,9 +36,17 @@ Stopping, starting and refreshing manually::
$("#twitterSearch").each(function(){ this.twitter.start(); });
$("#twitterSearch").each(function(){ this.twitter.refresh(); });
+Restricting results by geocode is possible:
+
+ $("#twitterSearch").liveTwitter('bacon', {geocode: '59.919151,10.749950,50km'});
+
== Changelog
+=== 1.3.3
+
+* Now supports geocoding
+
=== 1.3.2
* Profile image and username is toggleable, can also be shown on user_timeline.
View
@@ -1,11 +1,11 @@
/*
- * jQuery LiveTwitter 1.3.2
+ * jQuery LiveTwitter 1.3.3
* - Live updating Twitter plugin for jQuery
*
* Copyright (c) 2009 Inge Jørgensen (elektronaut.no)
* Licensed under the MIT license (MIT-LICENSE.txt)
*
- * $Date: 2009/09/16 $
+ * $Date: 2009/11/20$
*/
/*
@@ -89,7 +89,11 @@
var encodedQuery = encodeURIComponent(this.query);
var url = '';
if(twitter.mode == 'search'){
- url = "http://search.twitter.com/search.json?q="+encodedQuery+"&callback=?";
+ if(this.settings.geocode){
+ url = "http://search.twitter.com/search.json?q="+encodedQuery+"&geocode="+encodeURIComponent(this.settings.geocode)+"&callback=?";
+ } else {
+ url = "http://search.twitter.com/search.json?q="+encodedQuery+"&callback=?";
+ }
} else if(twitter.mode == 'user_timeline') {
url = "http://twitter.com/statuses/user_timeline/"+encodedQuery+".json?count="+twitter.limit+"&callback=?";
}
Oops, something went wrong.

0 comments on commit cbf181e

Please sign in to comment.