require 'rubygems'
require 'json'

route={}
route['waypoints']=(waypoints=[])
route['directions']=(directions=[])

waypoints << {'key'=>'velo', 'title'=>'Lehigh Valley Velodrome parking lot',
'desc'=>"The story of the Lehigh Valley Velodrome began overseas in the 1960’s when Bob Rodale, president of Rodale Press in Emmaus, witnessed world class bicycle racing during his trips to the Olympics and Pan Am Games.",
'latitude'=>40.545814, 'longitude'=>-75.614262, 'source'=>'Google Maps'}

waypoints << {'key'=>'mosser', 'title'=>'Mosser Street', 'latitude'=>40.548048,
'longitude'=>-75.611665, 'source'=>'Google Maps'}

waypoints << {'key'=>'hamilton', 'title'=>'Hamilton Blvd. @ Mosser',
'desc'=>'Older maps may refer to Hamilton Blvd. as Route 222, but Route 222 has been redirected to the north',
'latitude'=>40.545162, 'longitude'=>-75.610528, 'source'=>'Google Maps'}

waypoints << {'key'=>'weilers', 'title'=>'Weilers Rd. @ Hamilton',
'latitude'=>40.54195, 'longitude'=>-75.617137, 'source'=>'Google Maps'}

waypoints << {'key'=>'mertz1', 'title'=>'Mertztown Rd. @ Weilers',
'latitude'=>40.527762, 'longitude'=>-75.610163, 'source'=>'Google Maps'}

waypoints << {'key'=>'mertz2', 'title'=>'continue on Mertztown Rd.',
'latitude'=>40.517355, 'longitude'=>-75.63175, 'source'=>'Google Maps'}

directions << {'from'=>'velo', 'to'=>'mosser', 'distance'=>0.0, 'turn'=>'L'}
directions << {'from'=>'mosser', 'to'=>'hamilton', 'distance'=>0.2, 'turn'=>'R', 'hint'=>'HIGH TRAFFIC'}
directions << {'from'=>'hamilton', 'to'=>'weilers', 'distance'=>0.5, 'turn'=>'L', 'marker'=>'SS'}
directions << {'from'=>'weilers', 'to'=>'mertz1', 'distance'=>1.1, 'turn'=>'R'}
directions << {'from'=>'mertz1', 'to'=>'mertz2', 'distance'=>1.5, 'turn'=>'L'}

route['title']='LV Velodrome'

puts route.to_json

