Skip to content

Instantly share code, notes, and snippets.

@subdan
Created October 15, 2018 20:13
Show Gist options
  • Save subdan/4a1bdfb3f83264ff6cc8fad2118440f0 to your computer and use it in GitHub Desktop.
Save subdan/4a1bdfb3f83264ff6cc8fad2118440f0 to your computer and use it in GitHub Desktop.
let router = YMKMapKit.sharedInstance()?.createMasstransitRouter()
let timeOptions = YMKTimeOptions(departureTime: Date(), arrivalTime: nil)
let options = YMKMasstransitOptions(avoidTypes: [], acceptTypes: ["bus"], timeOptions: timeOptions)
let from = YMKPoint(latitude: 55.915501, longitude: 37.745450)
let to = YMKPoint(latitude: 55.887256, longitude: 37.661630)
router?.requestRoutes(withSource: from,
destination: to,
masstransitOptions: options,
routeHandler: { (masstransitRoute, error) in
print("Handler")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment