Hello all,
I receive two 'double' data points from an API representing a latitude and a longitude, and I want to convert them into a 'LatLng' data type in order to display them as a Google Maps map.
Hello all,
I receive two 'double' data points from an API representing a latitude and a longitude, and I want to convert them into a 'LatLng' data type in order to display them as a Google Maps map.
I tried to create a custom function that converts double values into 'LatLng'. The output value is correct, but I still get an error when I launch Google Maps.
L'API reçue :
The custom functions :
LatLng? latLngBis(
double longitude,
double latitude,
) {
/// MODIFY CODE ONLY BELOW THIS LINE
// Return "LatLng" with 2 datas "double"
return LatLng(latitude, longitude);
/// MODIFY CODE ONLY ABOVE THIS LINE
}
And the result of custom functions :
The result :