| java.lang.Object | ||
| ↳ | com.carto.routing.RoutingService | |
| ↳ | com.carto.routing.OSRMOfflineRoutingService | |
An offline routing service that uses Carto-specific routing
database file created from OSRM prepared routing files.
Note: this class is experimental and may change or even be removed in future SDK versions.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
OSRMOfflineRoutingService(String path)
Constructs a new OSRMOfflineRoutingService instance given database file.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| RoutingResult |
calculateRoute(RoutingRequest request)
Calculates routing result (path) based on routing request.
| ||||||||||
| synchronized void | delete() | ||||||||||
| String |
getProfile()
Returns the current routing profile.
| ||||||||||
| RouteMatchingResult |
matchRoute(RouteMatchingRequest request)
Matches specified points to the points on the road network.
| ||||||||||
| void |
setProfile(String profile)
Sets the current routing profile.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.carto.routing.RoutingService
| |||||||||||
From class
java.lang.Object
| |||||||||||
Constructs a new OSRMOfflineRoutingService instance given database file.
| path | The full path to the database file. |
|---|
| Exception | If the database file could not be opened or read. |
|---|---|
| IOException |
Calculates routing result (path) based on routing request.
| request | The routing request defining via points. |
|---|
| IOException |
|---|
Returns the current routing profile.
Matches specified points to the points on the road network.
| request | The matching request defining points. |
|---|
| IOException |
|---|
Sets the current routing profile.
| profile | The new routing profile. Routing profiles are dependent on specific routing service. |
|---|