Skip Navigation

[Resolved] How can I display the distance to a certain marker on the map?

This support ticket is created 6 years, 5 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.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by cristianM-3 6 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#920151

Hi

I have several locations (venues) as markers on a google map.
Their address is held in an address field attached to a custom post type.

I would like to show in a view the distance from the user to a certain venue.
Can someone show me the right "direction"? 🙂

Thank you

#920287

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - do you know that view's offers the filter "filter by distance".

Please check following Docs:
=> https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/#filtering-markers-by-distance

#920315

Hi
Thank you for your answer

I saw the link you said but I don't want to filter by distance.
I want to display a list view with all the markers and to display the calculated distance from the user to each marker.
I didn't find a short-code for the distance. Is there a way to build one?

Cristian

#920321

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Unfortunately to calculate the distance from user's location is not something that I can assist with as there is no such feature available with Toolset Maps and it would require some custom coding and this is out of the scope of our support forum.

However, if you need custom programming for your project, please feel free to contact our certified partners.
=> https://toolset.com/contractors/

I see we have feature request registered to add this feature to Maps, I will raise your voice to our internal ticket to highlight it again in front of our Devs. Please note that there is no ETA on it.

#920323

I'm sure this is already calculated since we can filter the markers by the distance from the user.
I'm only asking where to look to find it.

#920327

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I understand, its calculated but not as you wanted.

As you can see with following link:
=> hidden link

You need to specify the number (radius) from within you would like to display the results not the exact number from one location to another. As I explain, its on our list of feature request but no ETA on it.

#920340

OK
Thank you for your effort.

Cristian