I am not sure if anyone has done that before, I used an arduino board, a bike with goole map, then when I ride my bike at home, a marker will be showing on google map on the route that I set, and it will move on the route when distance generated by bike.
few years ago, I was riding bike with my friends, I was thinking if I can ride my bike at home and showing it on map, that would be very interesting for me. say, I want to go somewhere, but I can't, or no time to do that, maybe 'riding' on a map would be a choice.
here I used three services from google map API. and use C# wrote a program.
for the bike, I used a magnetic sensor and a magnet to get the speed of bike. I think you can use Infrared sensor for your treadmill if you want to do something similar.
one function I was thinking to add but did not, that is adding force or reducing force on bike wheel when elevator on the map changes. so, you can feel actual road situation.
connect the sensor with arduino and writing code for it. then use an USB cable connect to arduino board. spinning the bike wheel, then you will get the speed of bike, software will calculate the distance and then show a marker on map which you set the start point and destination previously. the streetview or picture will change accordingly.
software supplies two models to run, simulator and actual run. first vedio is simulator.