Sauter la navigation

[Résolu] Get lat and lon value from the address field

This support ticket is created Il y a 4 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

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

Dernière mise à jour par lesT Il y a 4 années et 4 mois.

Assisté par: Waqar.

Auteur
Publications
#1901975

Thank you very much for the earlier, I did not see that feature

Another question on an unrelated subject
I'm using "
[types field='dress' format='FIELD_LATITUDE, FIELD_LONGITUDE'][/types]

in a view and it works fine

but I also need to access Lat and lon in a snippet

-------------existing code---------
$post_ID = get_the_ID();
if ( get_post_type( $post_ID ) == 'pilot') {
$start_post_ID = $_SESSION["startpostid"]; //first pilot post ID

$start_latlon = explode(",", get_post_meta($start_post_ID, 'wpcf-user-address', true));
$this_latlon = explode(",", get_post_meta($post_ID, 'wpcf-user-address', true));
$a = intval(distance($start_latlon[0], $start_latlon[1], $this_latlon[0], $this_latlon[1], "M"));
-----------------
obviously the " wpcf-user-address" is incorrect, can you please advise how I can access lat/lon within this code
Thanks, Les