This question is locked. New answers and comments are not allowed.
Hi,
We're using the SQLite plugin and we're trying to calculate the distance between the user and a list of locations set in the database, which all have a longitude and latitude set against them for use in a listview. Normally this wouldn't be a problem however SQLite does not seem to support many math functions such as 'SQRT' etc and in our database query we need to sort the results by distance.
Lots of googling later and I found this blog post which details how to extend SQLite with a custom function: http://www.thismuchiknow.co.uk/?p=71
However I cannot find any documentation on how to extend the SQLite plugin in the same way as discussed in the blog post to get a similar method working. Can anyone give me any pointers on how to overcome this problem?
Many thanks.
Duncan.
We're using the SQLite plugin and we're trying to calculate the distance between the user and a list of locations set in the database, which all have a longitude and latitude set against them for use in a listview. Normally this wouldn't be a problem however SQLite does not seem to support many math functions such as 'SQRT' etc and in our database query we need to sort the results by distance.
Lots of googling later and I found this blog post which details how to extend SQLite with a custom function: http://www.thismuchiknow.co.uk/?p=71
However I cannot find any documentation on how to extend the SQLite plugin in the same way as discussed in the blog post to get a similar method working. Can anyone give me any pointers on how to overcome this problem?
Many thanks.
Duncan.