Skip to Content

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:

  • toLzLocation for an LzLocation with optional indoor context.
  • toLocation for a plain Android Location .
  • toLatLng for a MapLibre LatLng.
  • distanceTo for computing the distance to another SdkLatLngDTO.

See also

LzLocation
toLzLocation
toLocation
toLatLng

Constructors

SdkLatLngDTOconstructor(latitude: Double , longitude: Double )

Properties

latitude

var latitude: Double

The latitude coordinate in degrees.

longitude

var longitude: Double

The longitude coordinate in degrees.

Functions

distanceTo

fun SdkLatLngDTO.distanceTo(latLng: SdkLatLngDTO): Float

Computes the distance in meters between this SdkLatLngDTO and another.

toLatLng

fun SdkLatLngDTO.toLatLng(): LatLng

Types: LatLng

Converts this SdkLatLngDTO into a MapLibre LatLng for use with map operations such as camera positioning and marker placement.

toLocation

fun SdkLatLngDTO.toLocation(): Location

Converts this SdkLatLngDTO into a plain Android Location  without indoor context.

toLzLocation

fun SdkLatLngDTO.toLzLocation(inPlace: String? = null, inFloor: String? = null): LzLocation

Types: LzLocation

Converts this SdkLatLngDTO into an LzLocation with optional indoor context.

Last updated on