public class GraphHopperWeb extends Object implements com.graphhopper.GraphHopperAPI
| Constructor and Description |
|---|
GraphHopperWeb() |
GraphHopperWeb(String serviceUrl) |
| Modifier and Type | Method and Description |
|---|---|
static com.graphhopper.PathWrapper |
createAltResponse(org.json.JSONObject path,
boolean tmpCalcPoints,
boolean tmpInstructions,
boolean tmpElevation) |
okhttp3.Request |
createRequest(com.graphhopper.GHRequest request) |
String |
export(com.graphhopper.GHRequest ghRequest) |
okhttp3.OkHttpClient |
getDownloader() |
boolean |
load(String serviceUrl) |
static List<Throwable> |
readErrors(org.json.JSONObject json) |
com.graphhopper.GHResponse |
route(com.graphhopper.GHRequest ghRequest) |
GraphHopperWeb |
setCalcPoints(boolean calcPoints)
Enable or disable calculating points for the way.
|
GraphHopperWeb |
setDownloader(okhttp3.OkHttpClient downloader) |
GraphHopperWeb |
setElevation(boolean withElevation)
Enable or disable elevation.
|
GraphHopperWeb |
setInstructions(boolean b)
Enable or disable calculating and returning turn instructions.
|
GraphHopperWeb |
setKey(String key) |
GraphHopperWeb |
setOptimize(String optimize) |
public GraphHopperWeb()
public GraphHopperWeb(String serviceUrl)
public GraphHopperWeb setDownloader(okhttp3.OkHttpClient downloader)
public okhttp3.OkHttpClient getDownloader()
public boolean load(String serviceUrl)
load in interface com.graphhopper.GraphHopperAPIpublic GraphHopperWeb setKey(String key)
public GraphHopperWeb setCalcPoints(boolean calcPoints)
public GraphHopperWeb setInstructions(boolean b)
public GraphHopperWeb setElevation(boolean withElevation)
public GraphHopperWeb setOptimize(String optimize)
optimize - "false" if the order of the locations should be left
unchanged, this is the default. Or if "true" then the order of the
location is optimized according to the overall best route and returned
this way i.e. the traveling salesman problem is solved under the hood.
Note that in this case the request takes longer and costs more credits.
For more details see:
https://github.com/graphhopper/directions-api/blob/master/FAQ.md#what-is-one-creditpublic com.graphhopper.GHResponse route(com.graphhopper.GHRequest ghRequest)
route in interface com.graphhopper.GraphHopperAPIpublic String export(com.graphhopper.GHRequest ghRequest)
public okhttp3.Request createRequest(com.graphhopper.GHRequest request)
public static com.graphhopper.PathWrapper createAltResponse(org.json.JSONObject path,
boolean tmpCalcPoints,
boolean tmpInstructions,
boolean tmpElevation)
Copyright © 2012–2016. All rights reserved.