lib/cloudmade/routing.rb
def route(start_point, end_point, transit_points = nil, route_type = 'car', lang = 'en', route_type_modifier = nil)
      transit_points = ",[#{transit_points.map {|point| point.to_latlon}.join(',')}]" if not transit_points == nil
      route_type_modifier = "/#{route_type_modifier}" if not route_type_modifier == nil
      url = "/#{start_point.to_latlon}#{transit_points},#{end_point.to_latlon}/#{route_type}#{route_type_modifier}.js?lang=#{lang}&units=km"
      return Route.new(JSON.parse(connect url))
    end
def route(start_point, end_point, transit_points = nil, route_type = 'car', lang = 'en', route_type_modifier = nil)
      transit_points = ",[#{transit_points.map {|point| point.to_latlon}.join(',')}]" if not transit_points == nil
      route_type_modifier = "/#{route_type_modifier}" if not route_type_modifier == nil
      url = "/#{start_point.to_latlon}#{transit_points},#{end_point.to_latlon}/#{route_type}#{route_type_modifier}.js?lang=#{lang}&units=km"
      return Route.new(JSON.parse(connect url))
    end
def route ( start_point , end_point , transit_points = nil , route_type = 'car' , lang = 'en' , route_type_modifier = nil ) transit_points = ",[#{transit_points.map {|point| point.to_latlon}.join(',')}]" if not transit_points == nil route_type_modifier = "/#{route_type_modifier}" if not route_type_modifier == nil url = "/#{start_point.to_latlon}#{transit_points},#{end_point.to_latlon}/#{route_type}#{route_type_modifier}.js?lang=#{lang}&units=km" return Route . new ( JSON . parse ( connect url ) ) end
Build route. Returns route that was found, instance of CloudMade::Route
 * +start_point+ Starting point
 * +end_point+ Ending point
 * +route_type+ Type of route, e.g. 'car', 'foot', etc.
 * +transit_points+ List of points route must visit before
   reaching end. Points are visited in the same order they are
   specified in the sequence.
 * +route_type_modifier+ Modifier of the route type
 * +lang+ Language code in conformance to `ISO 3166-1 alpha-2` standard
 * +units+ Measure units for distance calculation
Build route . Returns route that was found instance of CloudMade :: Route * + start_point + Starting point * + end_point + Ending point * + route_type + Type of route e . g . car foot etc . * + transit_points + List of points route must visit before reaching end . Points are visited in the same order they are specified in the sequence . * + route_type_modifier + Modifier of the route type * + lang + Language code in conformance to ISO 3166 - 1 alpha - 2 standard * + units + Measure units for distance calculation