Sauter la navigation

[Résolu] Distance value based on custom field

This support ticket is created Il y a 5 années et 12 mois. 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)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Christian Cox Il y a 5 années et 12 mois.

Assisté par: Christian Cox.

Auteur
Publications
#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.