How can I make a geo location query in CBL?

I am using CBL for Android. I have the latitude and longitude values that the user saved earlier. And there are also values for the location the user has marked on the map.

I need to make a query on the database using the location information the user has selected on the map. So if the records in the database are located near the location the user chose, I want to show this.

How can I do that. I have no idea how to query this in CBL. I would be very glad if you could help. Thanks in advance.

We do not support geo spatial queries out of the box but here is a post that may help you get going