Package com.targomo.client.api.request
Class PolygonRequest
java.lang.Object
com.targomo.client.api.request.PolygonRequest
Creates polygons for the source points with specified travel times in minutes.
In case of GeoJson output, Polygons will be buffered, simplified and transformed
according to the respective values in
TravelOptions.
Buffer should be given in meters or in degrees, depending on the output CRS's unit.-
Constructor Summary
ConstructorsConstructorDescriptionUse default Client.PolygonRequest(TravelOptions travelOptions) Use default Client with specified travelOptionsPolygonRequest(TravelOptions travelOptions, String method) Use default Client with specified travelOptions and HTTP methodPolygonRequest(javax.ws.rs.client.Client client) Use a custom client implementationPolygonRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions) Use custom client with specified travelOptionsPolygonRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions, String method) Use custom client with specified travelOptions and the specified HTTP VERBPolygonRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions, String method, javax.ws.rs.core.MultivaluedMap<String, Object> headers) Use custom client with specified travelOptions and the specified HTTP VERB -
Method Summary
Modifier and TypeMethodDescriptionget()Execute requestvoidSpecify HTTP method to be usedvoidsetTravelOptions(TravelOptions options)
-
Constructor Details
-
PolygonRequest
public PolygonRequest(javax.ws.rs.client.Client client) Use a custom client implementation- Parameters:
client- Client to be used
-
PolygonRequest
public PolygonRequest()Use default Client. SeeSslClientGenerator -
PolygonRequest
Use default Client with specified travelOptions- Parameters:
travelOptions- Travel options parameters
-
PolygonRequest
Use default Client with specified travelOptions and HTTP method- Parameters:
travelOptions- Travel options parametersmethod- HTTP Method (GET or POST)
-
PolygonRequest
Use custom client with specified travelOptions- Parameters:
client- Client to be usedtravelOptions- Travel options parameters
-
PolygonRequest
Use custom client with specified travelOptions and the specified HTTP VERB- Parameters:
client- Client to be usedtravelOptions- Travel options parametersmethod- the HTTP VERB
-
PolygonRequest
public PolygonRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions, String method, javax.ws.rs.core.MultivaluedMap<String, Object> headers) Use custom client with specified travelOptions and the specified HTTP VERB- Parameters:
client- Client to be usedtravelOptions- Travel options parametersmethod- the HTTP VERBheaders- List of custom http headers to be used
-
-
Method Details
-
setTravelOptions
- Parameters:
options- Travel options parameters
-
get
Execute request- Returns:
- Polygon response
- Throws:
TargomoClientException- In case of error other than Gateway TimeoutResponseErrorException
-
setMethod
Specify HTTP method to be used- Parameters:
method- HTTP method (GET or POST)
-