public class PolyFactory
extends java.lang.Object
| Constructor and Description |
|---|
PolyFactory() |
| Modifier and Type | Method and Description |
|---|---|
private static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> |
cycle(com.mapbox.mapboxsdk.geometry.LatLng center,
double radius,
int sides,
double starting_angle)
Return an array of LatLng describing a geographic cycle of Earth.
|
static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> |
decode_cyclic(org.json.JSONObject cyclic_json,
float factor) |
static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> |
decode_polygon(org.json.JSONArray poly_json)
Returns an array of
LatLng describing a polygon from its json-encoded representation. |
static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> |
decode_shape(org.json.JSONObject shape)
Translates the JSON fragment of a shape to an array of
LatLng. |
@NonNull
public static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> decode_shape(org.json.JSONObject shape)
throws org.json.JSONException
LatLng.shape - The shape could be either "cyclic" or "polygon"LatLng.org.json.JSONException - from either the decode_polygon(JSONArray) or
decode_cyclic(JSONObject, float) method.@Nullable public static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> decode_polygon(org.json.JSONArray poly_json)
LatLng describing a polygon from its json-encoded representation.poly_json - The JSONArray to decodeLatLng or null if the JSONArray wasn't decoded.@Nullable
public static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> decode_cyclic(org.json.JSONObject cyclic_json,
float factor)
@NonNull
private static java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> cycle(com.mapbox.mapboxsdk.geometry.LatLng center,
double radius,
int sides,
double starting_angle)
center - Center of the cycleradius - Radius of the cycle in meterssides - Amount of points used to compute the cycle points, eg: resolutionstarting_angle - The angle_to of the first point, others will be added from this angle_to in
clockwise increment.