Class PackageManagerValhallaRoutingService

java.lang.Object
com.massifmaps.routing.RoutingService
com.massifmaps.routing.PackageManagerValhallaRoutingService

public class PackageManagerValhallaRoutingService extends RoutingService
A routing service that uses routing packages from package manager.
  • Constructor Details

    • PackageManagerValhallaRoutingService

      public PackageManagerValhallaRoutingService(PackageManager packageManager)
      Constructs a new instance of the PackageManagerValhallaRoutingService given package manager instance.
      Parameters:
      packageManager - The package manager instance to use.
  • Method Details

    • getConfigurationParameter

      public Variant getConfigurationParameter(String param)
      Returns the value of specified Valhalla configuration parameter.
      Parameters:
      param - The name of the parameter. For example, "meili.auto.search_radius".
      Returns:
      The value of the parameter. If the parameter does not exist, empty variant is returned.
    • setConfigurationParameter

      public void setConfigurationParameter(String param, Variant value)
      Sets the value of specified Valhalla configuration parameter.
      Parameters:
      param - The name of the parameter. For example, "meili.auto.search_radius".
      value - The new value of the parameter.
    • getProfile

      public String getProfile()
      Description copied from class: RoutingService
      Returns the current routing profile.
      Overrides:
      getProfile in class RoutingService
      Returns:
      The current routing profile.
    • setProfile

      public void setProfile(String profile)
      Description copied from class: RoutingService
      Sets the current routing profile.
      Overrides:
      setProfile in class RoutingService
      Parameters:
      profile - The new routing profile. Routing profiles are dependent on specific routing service.
    • matchRoute

      public RouteMatchingResult matchRoute(RouteMatchingRequest request) throws IOException
      Description copied from class: RoutingService
      Matches specified points to the points on the road network.
      Overrides:
      matchRoute in class RoutingService
      Parameters:
      request - The matching request defining points.
      Returns:
      The matching result or null if route matching failed.
      Throws:
      IOException
    • calculateRoute

      public RoutingResult calculateRoute(RoutingRequest request) throws IOException
      Description copied from class: RoutingService
      Calculates routing result (path) based on routing request.
      Overrides:
      calculateRoute in class RoutingService
      Parameters:
      request - The routing request defining via points.
      Returns:
      The result or null if routing failed.
      Throws:
      IOException
    • addLocale

      public void addLocale(String key, String json)