Skip Navigation

[Gelöst] Dynamic Google Maps link

This support ticket is created vor 3 Jahre, 4 Monate. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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: Africa/Casablanca (GMT+01:00)

This topic contains 1 Antwort, has 2 Stimmen.

Last updated by Jamal vor 3 Jahre, 4 Monate.

Assisted by: Jamal.

Author
Artikel
#1872111

Hello,

How can I put in an external link to a Google Maps Marker (Place), example:
<a href = "hidden link, 5.680801" target = "_ blank "rel =" noopener "data-wplink -url-error = "true"> route </ a >
instead of fixed coordinates insert the shortcodes of my "address" field or the "Longitude" and "Latitude" fields to dynamically use the coordinates in a content template.

My address field outputs the coordinates as follows:
{49.80087506277369,10.167969154320655}

Thank you!

Thank you!

#1873871

Jamal
Supporter

Languages: Englisch (English ) Französisch (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

Currently, the button block, which may be the link, does not support pulling the latitude and longitude from an address field. So, you will need to use Types shortcodes to pull the coordinates. You can use shortcodes inside a "Fields&Text" block or inside a Classic block.
The Types shortcode accepts a format attribute that can take a placeholder for the latitude and longitude. Check the summary in this previous ticket https://toolset.com/forums/topic/how-to-use-the-longitude-and-latitude-fields-in-a-view/
I was able to build a link for a "location " field with the following code:

<a href="<em><u>hidden link</u></em> field='location' format='FIELD_LATITUDE, FIELD_LONGITUDE'][/types]">Go to map</a>

I hope this helps. Let me know if you have any questions.

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