This example uses a GPX-file and a PNG-image to draw the route I took on my bike on a nice August evening.
The code for this example is made up of bits and pieces found here
And this site
of course also helped a bit to understand the long/lat => distance part.
The positioning of the overlay-image (Google Maps doens't have maps for the Netherlands yet) was done using the TPhoto
Google Maps API Extension
The map isn't finished though. I also took pictures and those still need to be included in the map.