Class: OSRMAPI

OSRMAPI

Create osrmAPI service instance

new OSRMAPI($http, $q)

Parameters:
Name Type Description
$http any
$q any https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md
Source:

Methods


get(service, version, profile, coordinates, options)

internal get request to the remote API
Parameters:
Name Type Description
service string
version string
profile string
coordinates string | Object the string format is {longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...]
options Object
Source:

match(profile, coordinates, options)

match service
Parameters:
Name Type Description
profile string
coordinates string | Object
options Object https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#service-match
Source:

nearest(profile, coordinates, number)

neareset service
Parameters:
Name Type Description
profile string
coordinates string | Object
number number integer >= 1 (default 1) Number of nearest segments that should be returned.
Source:

route(profile, coordinates, options)

route service
Parameters:
Name Type Description
profile string
coordinates string | Object
options Object https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#service-route
Source:

table(profile, coordinates, options)

table service
Parameters:
Name Type Description
profile string
coordinates string | Object
options Object https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#service-table
Source:

trip(profile, coordinates, options)

trip service
Parameters:
Name Type Description
profile string
coordinates string | Object
options Object https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#service-trip
Source: