Location

@JsonClass(generateAdapter = true)
data class Location(@Json(name = "latitudeE7") val latitudeE7: Int?, @Json(name = "longitudeE7") val longitudeE7: Int?, @Json(name = "placeId") val placeId: String?, @Json(name = "address") val address: String?, @Json(name = "name") val name: String?, @Json(name = "semanticType") val semanticType: SemanticType?, @Json(name = "accuracyMetres") val accuracyMetres: Int?, @Json(name = "locationConfidence") val locationConfidence: Double?, @Json(name = "isCurrentLocation") val isCurrentLocation: Boolean?, @Json(name = "calibratedProbability") val calibratedProbability: Double?, @Json(name = "sourceInfo") val sourceInfo: DeviceSourceInfo?)

Represents a location with various properties.

Example:

{
"latitudeE7": 414036299,
"longitudeE7": 21743558,
"placeId": "ChIJk_s92NyipBIRUMnDG8Kq2Js",
"address": "C/ de Mallorca, 401\n08013 Barcelona\nEspanya",
"name": "La Sagrada Familia",
"semanticType": "TYPE_SEARCHED_ADDRESS",
"sourceInfo": {
"deviceTag": 1234567890
},
"locationConfidence": 87.07311,
"calibratedProbability": 76.20023
}

Constructors

Link copied to clipboard
constructor(@Json(name = "latitudeE7") latitudeE7: Int?, @Json(name = "longitudeE7") longitudeE7: Int?, @Json(name = "placeId") placeId: String?, @Json(name = "address") address: String?, @Json(name = "name") name: String?, @Json(name = "semanticType") semanticType: SemanticType?, @Json(name = "accuracyMetres") accuracyMetres: Int?, @Json(name = "locationConfidence") locationConfidence: Double?, @Json(name = "isCurrentLocation") isCurrentLocation: Boolean?, @Json(name = "calibratedProbability") calibratedProbability: Double?, @Json(name = "sourceInfo") sourceInfo: DeviceSourceInfo?)

Properties

Link copied to clipboard

Approximate accuracy radius of the location measurement, in meters. A lower value means better precision. Example: 19

Link copied to clipboard

Address of the location. Example: "C/ de Mallorca, 401\n08013 Barcelona\nEspanya"

Link copied to clipboard

Calibrated probability of the location. Example: 100.0

Link copied to clipboard

Whether this is the current location. Example: true

Link copied to clipboard

Latitude coordinate of the location. Degrees multiplied by 10^7 and rounded to the nearest integer. Example: 414216106

Link copied to clipboard

Confidence in the location. Example: 100.0

Link copied to clipboard

Longitude coordinate of the location. Degrees multiplied by 10^7 and rounded to the nearest integer. Example: 21684775

Link copied to clipboard
val name: String?

Name of the location. Example: "La Sagrada Familia"

Link copied to clipboard

Google Maps Place ID of the location. Example: "ChIJk_s92NyipBIRUMnDG8Kq2Js"

Link copied to clipboard

Place type based on semantic information specific to the user. Example: "TYPE_HOME"

Link copied to clipboard

Information on the source that provided the location. Example: { "deviceTag": 1234567890 }