sdk-common / com.tomtom.online.sdk.common.location / LatLng / toArray

toArray

@NonNull open static fun toArray(locations: MutableList<LatLng!>!): DoubleArray

Transforms a list of LatLng locations into an array of double values, ignoring altitude, radius and bearing. Latitude of location at index n is located at index n*2 in the resulting array. Longitude of location at index n is located at index n*2+1 in the resulting array.

Parameters

locations - MutableList<LatLng!>!: list of LatLng locations

Return
DoubleArray: flattened coordinates array