Module: Routing::Adapter

Defined in:
lib/routing/adapter.rb,
lib/routing/adapter/here.rb,
lib/routing/adapter/test.rb,
lib/routing/adapter/navteq.rb,
lib/routing/adapter/rest_adapter.rb

Overview

The Adapter namespace holds classes that are responsible to accept an array of GeoPoints and calculate a route based on these positions.

Most commonly they will get the calculated route from a webservice and will create a compatible return value by using a matching Parser.

The end-point of the middleware stack is always the chosen adapter of a Routing instance which has to return the calculated route in form of GeoPoint objects again.

Creating your own adapter: To connect your own routing service, you can easily implement your own adapter. The only requirements are an instance method called calculate that will take an Array of GeoPoints as only parameters and will return an Array of GeoPoints when the calculation is done.

Defined Under Namespace

Classes: Here, Navteq, RestAdapter, Test