com.what3words.javawrapper.request.GridSectionGeoJsonRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of w3w-java-wrapper Show documentation
Show all versions of w3w-java-wrapper Show documentation
Java library for what3words REST API.
The newest version!
package com.what3words.javawrapper.request;
import com.what3words.javawrapper.What3WordsJavaWrapper;
import com.what3words.javawrapper.response.GridSectionGeoJson;
public class GridSectionGeoJsonRequest extends Request {
private String boundingBox;
private GridSectionGeoJsonRequest(Builder builder) {
super(builder.api);
boundingBox = builder.boundingBox;
}
private GridSectionGeoJson execute() {
return super.execute(api.what3words().gridSectionGeoJson(boundingBox, "geojson"), GridSectionGeoJson.class);
}
public static class Builder extends AbstractBuilder {
private String boundingBox;
public Builder(What3WordsJavaWrapper api, BoundingBox boundingBox) {
super(api);
this.boundingBox = String.valueOf(boundingBox.sw.lat) + "," + String.valueOf(boundingBox.sw.lng) + "," +
String.valueOf(boundingBox.ne.lat) + "," + String.valueOf(boundingBox.ne.lng);
}
public GridSectionGeoJson execute() {
return new GridSectionGeoJsonRequest(this).execute();
}
}
}