Update src2 function to 5.0 and correct some bugs
Convert getmaxspeed to check all layers