SdkLatLngDTO
data class SdkLatLngDTO(var latitude: Double, var longitude: Double)Data Transfer Object for geographic coordinates, used to deserialize latitude/longitude pairs from the Lazarillo routing and places API.
This is a lightweight DTO that maps directly to the JSON { "lat": ..., "lng": ... } structure returned by the API. It provides extension functions to convert into richer location types used throughout the SDK:
toLzLocationfor an LzLocation with optional indoor context.toLocationfor a plain Android Location .toLatLngfor a MapLibre LatLng.distanceTofor computing the distance to anotherSdkLatLngDTO.
See also
| LzLocation |
toLzLocation |
toLocation |
toLatLng |
Constructors
SdkLatLngDTO | constructor(latitude: Double , longitude: Double ) |
Properties
latitude
var latitude: DoubleThe latitude coordinate in degrees.
longitude
var longitude: DoubleThe longitude coordinate in degrees.
Functions
distanceTo
fun SdkLatLngDTO.distanceTo(latLng: SdkLatLngDTO): FloatComputes the distance in meters between this SdkLatLngDTO and another.
toLatLng
fun SdkLatLngDTO.toLatLng(): LatLngTypes: LatLng
Converts this SdkLatLngDTO into a MapLibre LatLng for use with map operations such as camera positioning and marker placement.
toLocation
fun SdkLatLngDTO.toLocation(): LocationConverts this SdkLatLngDTO into a plain Android Location without indoor context.
toLzLocation
fun SdkLatLngDTO.toLzLocation(inPlace: String? = null, inFloor: String? = null): LzLocationTypes: LzLocation
Converts this SdkLatLngDTO into an LzLocation with optional indoor context.