Well using OpenLayers you can load the speed data as vectors into a layer. This can be done for instance by converting all the speed data into KML and add different color styles to the sections for the different speeds. Use a GML parser to load the KML into OL. An example of this is my routable Garmin maps website. In this case the road sections are squares and the only color style is the red one (the blue is the default style), but in general it’s the same as your application. Just have a look at the javascript source code and KML file.