Problem with value type of lng/lat coordinates

Hello Community,

I need your help (again ๐Ÿ™ƒ).

I use the geo location point in my database.
And in API I get the following output:
{
'map_point': {
'type': 'point',
'data': {
'lng': 11.24084525997,
'lat': 49.484516944722
}
}
}
I want to use the values of lng and lat in my function. In my function I expect these values to be of type decimal.
But when I check them with is_decimal I get a false.
And when I try to convert the values with to_decimal I get a 1.

How can I convert lng and lat values to decimal type?

Thanks in advance! ๐Ÿ™
Other
2 replies