Posts Tagged ‘javascript’

Chicago Ward Remap Outlines

The wards in Chicago were recently remapped and I was mesmerized by the idea of creating an interaction that would animate the transition from the old to the new wards. I shortly found out that tweening polygons in a non-intersecting and interlocked fashion is a complicated topic. I’ve done a lot of reading about the math and research that has been done in this space and found a few interesting theories which I would like to implement in a future version. Currently, the morphing/tweening/interpolation is done with an array interpolator. Unfortunately, this technique causes the intermediate polygons to self-intersect and morph inefficiently. Ideally, I would overlay these polygons on a slippy map and there would be no gaps between the polygons during the morphing.

Overall, I am happy with the way this prototype came out and how it highlights the need for more robust polygon morphing. I am excited to see what the map transition will look like when a more fluid animation is implemented.

Chicago CTA Bus Tracker Gadget for Windows

View estimated arrival times for selected Chicago bus routes.
Windows 7 and Windows Vista compatible.

Download Chicago Bus Tracker Gadget Version 1.1
Updated October 2010: Now uses the official Bus Tracker API
Version 1.1 Changelog

Sofware Development Extras

Windows Gadget Build Script – A powershell script that creates a .gadget file from source

jQuery CTA BusTracker API Plugin – A jQuery plugin that wraps the Bus Tracker API endpoints into javascript methods.
The Same Origin Policy currently prevents using this script outside of a gadget since Windows gadgets do not enforce the Same Origin Policy.

Special thanks to Harper Reed for his work on the Chicago Transit API and Kevin Zolkiewicz for the Chicago Bus Tracker Widget.
This widget was not created by the Chicago Transit Authority.

Chicago Bus Tracker Gadget Source Hosted at GitHub

Chicago Train Visualization

The original rail system map image was found at the CTA's map page.

Runs best in a browser that has javascript acceleration (Firefox 3.5/Chrome). Trains are only added/removed at the beginning of the line.

I created this to test out some jQuery and javascript animation ideas I had. There is no
real practical use for it now. Think of it as a model railroad without the constant derailments.

Train Instructions

  • Hover: Pauses and Selects Train
  • Click: Reverses Selected Train
  • Double Click: Deletes Selected Train

Controls

  • Power:
  • Display:
  • Animation: (affects performance)
  • Speed

    Interval: 1000ms
    Processing Time: 0ms

  • Trains

    Max Trains: 25
    Current Trains: 25

Black Line

  • Requires at least two stops to have trains added
  • Click Map: Create Stop
  • ENTER: Show Marker Crosshair
  • w/a/s/d: Move Marker Crosshair
  • 1/2/3: Change Marker Crosshair Movement Scale
  • e: Output Marker Crosshair Coordinates