Jump to content
  • 0

Make an address a clickable link to open native map application on phone?



I have a directory table with an address field.  Have Address, City, State and Zip, but also have a calculated filed combining address+city+state+zip into one address string.   Able to convert that field to a clickable link that would open the users native map app on thier phone? 


I have seen the material at: 


But that appears more for embedding maps.  Im just looking to have an address fire the users map app.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I previously did something sort of like this but it was only with Google Maps. You might be able to mess around with it to open with the native maps app. In all honesty, I don't think I've tried on an Apple device that didn't have Google Maps... it might just open it in the native app instead. Might be worth a test.

First, create an HTML Block where the clickable address will go

<p><div id="Location"></div></p>

Then in the footer:


$("#Location").html('<a target="_blank" rel="noopener noreferrer" href=" '+ 'https://www.google.com/maps/dir/?api=1&origin=&destination=' + '[@field:Address!]/' + '&dir_action=navigate' + '&travelmode=driving' + ' " >[@field:Address]</a>');


If the device has the Google Maps app, it will open it in the app. Otherwise it will open it in the browser.

Side note, I believe this starts navigation automatically. You can delete the  + '&dir_action=navigate' + '&travelmode=driving' + ' if you'd like.

Link to comment
Share on other sites

  • 0

Thanks for the reply.  I couldnt get that one to fire.  Kept showing the text of the htrml, not an actual link. Probably a typo or format issue.    Your post got me going in the right direction though, as I didnt want any script as it might mess with my responsive design setting.

I created a new formula field in table called "Google_address" using:

'https://www.google.com/maps/search/?api=1&query='+[@field:Address]+','+[@field:City]+','+[@field:State]+','+[@field:Zipcode]+'&dir_action=navigate' + '&travelmode=driving'

Then in data page just pulled it in via an HTM block using:

<a href="[@field:Google_address!]">[@field:Full_address]</a>

[@field:Full_address] was just  table fieldI already had in place that concatinated the address, city, state, zipcode.  So in the end I could have it look like this:



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...