Added routeLength argument in generate()

Also added autoatic generation in Map constructor.