Where's Tim RSSBus Template

Tim Hibbard has added GeoRSS to his Where's Tim location feed (by the way, you can get your own location feed through Where's Tim On Demand).

I've talked about how RSSBus can be used to work with feeds and generate new output based on them.  Here's a simplistic but  neat example:  I took Tim's location feed and called it from an RSSBus template.  Inside the template I split out KML (Google Earth's XML format) that draws a path showing Tim's path throughout the day.  Here's what the KML looks like in Google Earth:

Now here's a listing of the actual RSSBus Template that I used.  Note that the template itself is simply KML, with two RSBScript calls (rsb:set and rsb:call) mixed in.  Those two RSBScript calls are where RSSBus does its work.

<!-- Set the content type of the output stream -->
<rsb:set item=_httpheaders attr="Content-Type" value="text/xml"/>

<xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Placemark>
  <description>Where's Tim Path<description>
  <name>Tim's Path<name>
  <LookAt>
    <longitude>-95.239424<longitude>
    <latitude>38.9642026666667<latitude>
    <range>305.8880792294568<range>
    <tilt>0.61038665812578<tilt>
    <heading>0.06133439171233<heading>
  <LookAt>
  <visibility>1<visibility>
  <open>0<open>
  <Style>
    <LineStyle>
      <color>ff00ffff<color>
    <LineStyle>
    <PolyStyle>
      <color>7f00ff00<color>
    <PolyStyle>
  <Style>
  <LineString>
    <extrude>1<extrude>
    <tessellate>1<tessellate>
    <altitudeMode>clampedToGround<altitudeMode>
    <coordinates>
    <rsb:call op="http://www.timhibbard.com/wherestim/rss_location.aspx">
    [georss:point | LSplit(' ',2)],[georss:point | LSplit(' ',1)]
    <rsb:call>
    <coordinates>
  <LineString>
<Placemark>
<kml>
All this template is doing is:

 

1.  Setting the content-type to text/xml
2.  Calling Tim's location feed, and for each item in the feed outputting the georss:point element (after reversing it, which is what the splits are for) value inside the KML coordinates element.

Technorati tags:     

Print | posted on Thursday, June 15, 2006 9:50 AM

Feedback

# re: Where's Tim RSSBus Template

Left by Tim Hibbard at 6/15/2006 11:26 AM
Gravatar Very cool!!!

Your comment:





 
 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski