Skip Navigation

[Resolved] Calculating the distance between two locations

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to calculate the distance between 2 points on our Toolset Maps plugin.

Solution:

Unfortunately for the calculation this is not something that I can assist with as it would require some custom coding and this is out of the scope of our support forum.

However what you can do is to contact one of our registered contractors for assistance on this one.
https://toolset.com/contractors/

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.01 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by gavinS-2 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#897210

I have two custom post types: parties and profiles.

Parties has a field 'venue' and profiles has a field 'location'.

I now want to calculate the distance between the two points. How does Toolset store the location?

From what I can tell the location is stored as a string of the address, not as a lat/long value. Is this right? Do I need to query the Google Map API to get the actual values and do the calculation, or is there an easier way?

#898230

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gavin,

Thank you for contacting our support forum.

Actually it is stored as a string in the address field.

Unfortunately for the calculation this is not something that I can assist with as it would require some custom coding and this is out of the scope of our support forum.

However what you can do is to contact one of our registered contractors for assistance on this one.
https://toolset.com/contractors/

Thanks,
Shane

#900881

Thanks Shane, that's what I thought.