for a client project I had to do all sorts of geolocation based tasks. I wanted to put the result into a plugin for quite a while and now it’s available:
When losing focus from target1 or target2, get distance with ajax and add it to the distance part of field. All 3 fields could be saved. Then the distance field would be “cached” until next ajax fetch.
With it you would don’t need lat, long to get distances between two points.
Just a hunch, but is this a localisation issue? What language/timezone is your sever? Some countries use a , instead of a . for numbering. Explains why you cant find it in the code if its being done dynamically according to locale. It’s not a comma separator, i think its actually decimal character. Just a hunch, I’ve not used other languages before.
i am currently using the plugin ( on my localhost). i want to get the distance from point A to B. point A is from the user and point B is from the database.
problem is that when ever i request something (over ajax), 7/10 request returns 500 error from the plugin.
when ever i use the geo class, the request takes too long to return a result.
@arphie I’m not sure I understand your issue - there seem to be too many areas where things could be going wrong, which may have nothing to do with the plugin. For instance: your problem (1) could be simply an issue with your ajax code. Similarly, the issue on point (2) could be related to your database or query code.
Would you be able to post examples of your code, so someone can try to help you troubleshoot?