Saturday, February 04, 2006
 
At least I accomplished something today.
Since my day of skiing in Tahoe got rained out, I grabbed an early bus home and ended up mostly rewriting my AJAXy running log.

Doctor Awesome's New(ly rewritten) Running Log

Here's how it works. There's an XML data file that I export from ForeAthlete Logbook. That sits on the server. Two scripts, menu.php and run.php generate two (1, 2) quasi-JSON pages on the fly from that XML file. It ends up being a lot less data to transfer, and evaling is a lot easier and faster than parsing the same XML file client side. Of course, doing a server-side XML parse for every page and map load is a bit inefficient, but putting in caching isn't high on my priority list.

The Javascript handles setting up the Google Maps API stuff, fetching and populating the menus, and the importing of the coordinate data into the map.

Pretty hot. Of course, there's only one run in there right now, so I've got to work on populating it (which just takes pounding the pavement). Keep watching, as I'll continually be throwing more features in (any particular ideas can be added in the comments). I'm eyeing putting in dynamically created client-side graphs of speed and altitude using some using VML in IE and SVG (or Canvas) in other browsers.

Also, if you'd like to use the code, go nuts. It's nothing special. Let me know if you want comments in there or something.

Update: I modified the constructor for Loader so that the map is passed in and the menu is optional. That allowed me to make a fullscreen version that looks at the menu data and always displays the latest one. That allows me to put an iframe on this page pointing to that URL. As you can see, it makes a nice little addition to the left-side menu.
Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?