public class GHRequest extends Object
| Constructor and Description |
|---|
GHRequest() |
GHRequest(double fromLat,
double fromLon,
double toLat,
double toLon)
Set routing request from specified startPlace (fromLat, fromLon) to endPlace (toLat, toLon)
|
GHRequest(double fromLat,
double fromLon,
double toLat,
double toLon,
double startHeading,
double endHeading)
Set routing request from specified startPlace (fromLat, fromLon) to endPlace (toLat, toLon)
with a preferred start and end heading.
|
GHRequest(GHPoint startPlace,
GHPoint endPlace) |
GHRequest(GHPoint startPlace,
GHPoint endPlace,
double startHeading,
double endHeading)
Set routing request from specified startPlace to endPlace with a preferred start and end
heading.
|
GHRequest(int size) |
GHRequest(List<GHPoint> points)
Set routing request
|
GHRequest(List<GHPoint> points,
List<Double> headings)
Set routing request
|
| Modifier and Type | Method and Description |
|---|---|
GHRequest |
addPoint(GHPoint point)
Add stopover point to routing request.
|
String |
getAlgorithm() |
List<String> |
getCurbsides() |
List<Double> |
getHeadings() |
PMap |
getHints() |
Locale |
getLocale() |
List<String> |
getPathDetails() |
List<String> |
getPointHints() |
List<GHPoint> |
getPoints() |
String |
getProfile() |
List<String> |
getSnapPreventions() |
static boolean |
isAzimuthValue(double heading) |
GHRequest |
putHint(String fieldName,
Object value)
This method sets a key value pair in the hints and is unrelated to the setPointHints method.
|
GHRequest |
setAlgorithm(String algo)
For possible values see AlgorithmOptions.*
|
GHRequest |
setCurbsides(List<String> curbsides) |
GHRequest |
setHeadings(List<Double> headings)
The starting directions at the various points as north based azimuth (clockwise) in [0, 360)
or NaN for equal preference
|
GHRequest |
setLocale(Locale locale) |
GHRequest |
setLocale(String localeStr) |
GHRequest |
setPathDetails(List<String> pathDetails) |
GHRequest |
setPointHints(List<String> pointHints) |
GHRequest |
setPoints(List<GHPoint> points) |
GHRequest |
setProfile(String profile) |
GHRequest |
setSnapPreventions(List<String> snapPreventions) |
String |
toString() |
public GHRequest()
public GHRequest(int size)
public GHRequest(double fromLat,
double fromLon,
double toLat,
double toLon,
double startHeading,
double endHeading)
public GHRequest(double fromLat,
double fromLon,
double toLat,
double toLon)
public GHRequest(GHPoint startPlace, GHPoint endPlace, double startHeading, double endHeading)
public GHRequest(List<GHPoint> points, List<Double> headings)
points - List of stopover points in order: start, 1st stop, 2nd stop, ..., endheadings - List of favored headings for starting (start point) and arrival (via
and end points) Headings are north based azimuth (clockwise) in (0, 360) or NaN for equal
preferencepublic GHRequest addPoint(GHPoint point)
point - geographical position (see GHPoint)public GHRequest setHeadings(List<Double> headings)
public static boolean isAzimuthValue(double heading)
public String getAlgorithm()
public Locale getLocale()
public String getProfile()
public PMap getHints()
public GHRequest putHint(String fieldName, Object value)
setPointHints(List)Copyright © 2012–2020. All rights reserved.