iOS 5 changed the way the built-in Google Maps App draws routes:

I would now like to replicate the design of the route overlay in my own app but I am currently only able to draw a plain blue line. I would like to add the 3D-effect with the gradient, borders and the glow. Any ideas on how to accomplish this?
Currently I’m using the following code:
CGContextSetFillColorWithColor(context, fillColor.CGColor);
CGContextSetLineJoin(context, kCGLineJoinRound);
CGContextSetLineCap(context, kCGLineCapRound);
CGContextSetLineWidth(context, lineWidth);
CGContextAddPath(context, path);
CGContextReplacePathWithStrokedPath(context);
CGContextFillPath(context);
Resulting in a rather ugly line:

Thanks!
Update: The solution should work on iOS 4.0 and up.
I think that @ChrisMiles is correct in that the segments are probably being drawn individually. (I initially thought that this might have been doable using
CGPatternRefbut you don’t have any access to the CTM or path endpoints inside the pattern drawing callback.)With this in mind, here is an exceedingly crude, back-of-the-envelope example of how you might begin such an effort (filling the segments individually). Note that:
Hopefully this can get you started at least (and works through some of the analytic geometry).