TUAW.com has an excellent article on cycling apps for the iPhone. Make sure you read the comments section. Other readers have added additional suggestions. Most are pay but a few are free including one from REI. One reader mentions rubiTrack which is an app for the iPhone and Mac to track all kinds of fitness activitiy. It looks really interesting.
You can find the TUAW article here.
Others mentioned by readers:
Trails
If you are looking for a site to upload and download tracks for Trails and other Smart Phone apps check out EveryTrail.com. Trails is compatible although EveryTrail offers its own iPhone, SmartPhone, BlackBerry, and Android applications.
Enjoy!