Package globus.glroute
Class GLRouteElevation
java.lang.Object
globus.glmap.GLNativeObject
globus.glroute.GLRouteElevation
Class to load height data
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback invoked when a height request finishes. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelRequest(long requestID) Cancels a started request.floatgetMax()Maximum elevation value inside the profile.floatgetMin()Minimal elevation value inside the profile.floatheightAtIndex(int index) Returns elevation at the given point index.static longrequestHeightForRoute(GLRoute route, GLRouteElevation.ResultsCallback resultsCallback) Requests height for points in routestatic longrequestOfflineHeightForRoute(GLRoute route, boolean allowPartial, GLRouteElevation.ResultsCallback resultsCallback) Requests height for points in routeMethods inherited from class globus.glmap.GLNativeObject
dispose
-
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 informationresultsCallback- 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 informationallowPartial- when 'false' request will fail if any tile with height data is absentresultsCallback- 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.
-