Class GLRouteElevation

java.lang.Object
globus.glmap.GLNativeObject
globus.glroute.GLRouteElevation

public class GLRouteElevation extends GLNativeObject
Class to load height data
  • Method Details

    • requestHeightForRoute

      public static long requestHeightForRoute(@NonNull GLRoute route, @NonNull GLRouteElevation.ResultsCallback resultsCallback)
      Requests height for points in route
      Parameters:
      route - route to update with height information
      resultsCallback - callback that is called when request is finished
      Returns:
      request ID
    • requestOfflineHeightForRoute

      public static long requestOfflineHeightForRoute(@NonNull GLRoute route, boolean allowPartial, @NonNull GLRouteElevation.ResultsCallback resultsCallback)
      Requests height for points in route
      Parameters:
      route - route to update with height information
      allowPartial - when 'false' request will fail if any tile with height data is absent
      resultsCallback - callback that is called when request is finished
      Returns:
      request ID
    • cancelRequest

      public static void cancelRequest(long requestID)
      Cancels a started request.

      Cancellation is best-effort; already running work may still complete and invoke callbacks.

      Parameters:
      requestID - ID of request to cancel
    • getMin

      public float getMin()
      Minimal elevation value inside the profile.
      Returns:
      Minimal height in meters.
    • getMax

      public float getMax()
      Maximum elevation value inside the profile.
      Returns:
      Maximum height in meters.
    • heightAtIndex

      public float heightAtIndex(int index)
      Returns elevation at the given point index.
      Parameters:
      index - Index of the point sampled along the route profile.
      Returns:
      Height in meters for the specified point.