map visualization - get directions

Martooti

Member
Is it possible to enable get directions upon click on the pin in google map visualization from mobile device?
From user current location to the place clicked of course.
Thank you for all answers
 
I googled around and found a way of getting you almost what you want. I added a new special placeholder {nav_url} which you can use in your bubble template, which is a link like this:

Code:
http://maps.google.com/maps?q=loc:34.732267,-86.587593&navigate=yes

... so in your template, you would do ...

Code:
<a href="{nav_url}">Navigate</a>

... which will open either the Google maps site in nav mode (desktop) or give you the standard app chooser in Android, and if you select Maps, it'll open in the first screen for the Navigate. No idea what it does on iOS.

It may be possible to find a URL that lets you specify a start location, and skip that first step of selecting the "starting" location. If you can find it, give me the link to whatever you find, and I'll add it to the code.

https://github.com/Fabrik/fabrik/commit/5cba503e18641e5fe98a34a4302ae90fcccda32f

-- hugh
 
PS, I also added {coords} as a placeholder, which insert the lat,lon so you can craft your own URL and insert the coords, if you come up with a better way of doing it that just needs the coords plugged in to the URL.

-- hugh
 
Thank you for your attention.
Unfortunately it is not working for me :(
I added
Code:
<h3>{jos_mt_links___link_name}</h3><div class="image-container" style="height:50px">{jos_mt_links___path}<br/><a href="{nav_url}">Get directions</a></div>
to the bubble and I added two lines in googlemap.php, but when I open the map link shows: website_url/{nav_url} . What do I make wrong?
My googlemap.php file attached because actually when I add the extra lines of the code they appear in different lines. Also when I downloaded the full file googlemap.php from github and uploaded to the server it don't open the page with the map at all.
 

Attachments

  • googlemap.txt
    21.4 KB · Views: 234
you should download all files from github, not cherry pick a single file.
Let us know if it works after having done that, if not we can look further.

-Rob
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top