JSONResult

open class JSONResult<T>(val boundingBox: List<String>, val geoJSON: GeoJSON<T>, val displayName: String, val type: String)

The class that represents the JSON returned by the API.

Constructors

Link copied to clipboard
constructor(boundingBox: List<String>, geoJSON: GeoJSON<T>, displayName: String, type: String)

Properties

Link copied to clipboard
@SerializedName(value = "boundingbox")
val boundingBox: List<String>

A list of four strings representing the bounding box coordinates in the order: minimum longitude, minimum latitude, maximum longitude, maximum latitude.

Link copied to clipboard
@SerializedName(value = "display_name")
val displayName: String

The display name for the location as provided by the API.

Link copied to clipboard
@SerializedName(value = "geojson")
val geoJSON: GeoJSON<T>

The GeoJSON object containing the coordinates of the location.

Link copied to clipboard

A string indicating the type of feature returned by the API

Functions

Link copied to clipboard

Converts a JSONResult object containing GeoJSON data into a CartographicBoundary object. A CartographicBoundary represents the geographic boundary of an administrative unit (e.g., country, state, county).