mapping tweets on the go
DESCRIPTION
Convergence of Maps, Social, and LBS on Mobile devicesTRANSCRIPT
Mapping Tweets on the Go
Convergence of Social, Mobile and Location-Based
Services
Shawn ShenDeveloper Advocate
Nov 17, '09
Three Powerful Trends
• Social Web and Apps: Facebook/Twitter • Mobile Web and Mobile Apps
• Location, Maps, and LBS
Google Maps (now Mobile)
• Maps API V3o Designed with Model View Controller (MVC) o Optimized for Mobile apps
• Local Search APIs• Monetization
o Map Ad Unito GoogleBaro AdSense for Mobile o AdSense for Mobile Apps o AdMob...
Social Networks Going Geo
• Twitter o Grown 10-15x in 2009 at ~50M userso Working on geo/location APIs
Location-based Trend APIs Location-aware Tweets with Lat/Long
• Facebooko 300M+ userso Platform of Apps: $800M run rateo Working on geo-location-based services
• Social APIs and Platformso 200-300K developerso Billions of app installs
Mobile Apps and Mobile Web
• Mobile Appso iPhone: 100K+ apps; billions of installso Android:
13K+ apps Google Maps Navigation
o 100K+ developers • Mobile Web
o Usage growth 100-200% y/yo Monthly unique users 1/3 of web 80-100M
• Ads marketo $500M+o AdMob acquired by Google
Convergence of the Three Trends
• Social Web and Apps: Facebook + Twitter• Mobile Web and Mobile Apps• Location-aware services on Google Maps Google Maps + Social + Mobile => Lots of Creative Apps
Dec '09 Geo Hackathon at Googleplex
• Time: 12/15 Tues• Location:
Bodega Bay Tech Talk 1950 Charleston Ave Googleplex Mountain View, CA
• RSVP at:
http://bit.ly/2KdlYJ or http://www.meetup.com/webmapsocial/calendar/11877554/
Demo App: Mapping Tweets on the Go
iUI: Library for web apps on mobile phones
Location-aware Tweets
Demo & References
http://mmmop.com Links• iUI: http://code.google.com/p/iui/• python-twitter:
ohttp://code.google.com/p/python-twitter/• Blog by Bob Hitching: mobile web apps
ohttp://bit.ly/1Uh2Ph• Maps Javascript API V3
o http://code.google.com/apis/maps/documentation/v3/
How Does the Demo App Work?
• Front-endo iUI: Look and Feel of Native AppoGoogle Maps API V3: optimized for mobile
• Back-end
oGoogle App Engineopython-twitter libraryoTwitter APIs
Get Geo Location
navigator.geolocation.getCurrentPosition(function(position) { // success - geolocation authorized by user. map.setOptions({ center: new google.maps.LatLng( position.coords.latitude, position.coords.longitude), zoom: 11 }); }, function() { // fail - geolocation denied by user. do nothing.
});
Get Geo-tagged Tweets tweets = api.GetUserTimeline() buff = '<?xml version="1.0" encoding="UTF-8"?>' + "\n" buff = buff + "<markers>\n" for u in tweets: id = u.GetId() ddd = api.GetStatus(id) dd = json.read(ddd) for g in dd.iterkeys(): if g == 'geo' and dd[g] != None: buff = buff + "\t<marker " buff = buff + 'id="' + str(u.GetId()) + '" ' ... buff = buff + "</markers>\n" self.response.out.write(buff)
Put Geo Tweets as Markers downloadUrl('tw.php', addTweets);
function addTweets(data) { var m = data.documentElement.getElementsByTagName("marker"); for (var i = 0; i < m.length; i++) { ... lat = parseFloat(m[i].getAttribute("lat")); lng = parseFloat(m[i].getAttribute("lng")); ... marker = new google.maps.Marker({ position: new google.maps.LatLng(lat, lng), ... }); }}
More Services: Local Search
Monetization: Map Ad Unit
Monetization: GoogleBar
Dec '09 Geo Hackathon• Google Maps/Earth APIs • Time: 12/15 Tues• Location:
Bodega Bay Tech Talk 1950 Charleston Ave Googleplex Mountain View, CA
• RSVP at:
http://bit.ly/2KdlYJ or http://www.meetup.com/webmapsocial/calendar/11877554/