I do this by pre-processing the GPX data into a list of points. This has the added advantage that you can filter out redundant points and data reducing display and download time. I currently only include points 30 metres apart, which seems to work quite well. Example here, or lots more here.