I noticed that helper.addPolyline uses, quite reasonably, file extention to branch for gpx vs kml. But I have some data sources that don't use extentions. May I suggest an optional flag to force a specific format?
(Yes, I could "trick" it by adding a "&fakeExtension=.gpx" to the url but felt a bit odd.)