Skip Navigation

[Resolved] Distance value based on custom field

This support ticket is created 5 years, 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1173453

hi is the "origin_source='visitor_location' " user current location base on gps?

can we define the origin_source base on custom field; I.e train station?

Thank you

#1173457
Screen Shot 2018-12-27 at 9.36.34 AM.png

hi is the "origin_source='visitor_location' " user current location base on gps?
In this case the User's location is based on the browser's Geolocation API, which is part of the HTML5 standard:
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API
http://www.andygup.net/html5-geolocation-api-%E2%80%93-how-accurate-is-it-really/
GPS information may be part of the algorithm used to determine location, but it's used indirectly.

can we define the origin_source base on custom field; I.e train station?
If you want to display the distance between two arbitrary locations, you can use the toolset-maps-distance-value shortcode with a URL parameter or a pair of latitude/longitude coordinates. We have more information about this shortcode available here:
https://toolset.com/documentation/user-guides/maps-shortcodes/#toolset-maps-distance-value
See the attached screenshot.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.