Skip to content

Instantly share code, notes, and snippets.

@mck-
Last active August 29, 2015 14:13
Show Gist options
  • Save mck-/ce8b8a62da493991cc48 to your computer and use it in GitHub Desktop.
Save mck-/ce8b8a62da493991cc48 to your computer and use it in GitHub Desktop.
Routific gem example in Australia
require 'routific'
routific = Routific.new(API_KEY)
routific.setLocation("Funtastico", {
"name" => "12 Rokeby Road",
"lat" => -31.945864,
"lng" => 115.823981,
})
routific.setLocation("Applabs", {
"name" => "20 Railway Road",
"lat" => -31.945735,
"lng" => 115.822356,
})
routific.setVisit("Funtastico", {
"start" => "12:00",
"end" => "14:00",
"duration" => 60,
})
routific.setVehicle("vehicle_1", {
"start_location" => "Applabs",
"end_location" => "Applabs",
"shift_start" => "8:00",
"shift_end" => "16:00",
})
route = routific.getRoute()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment