Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using http://thedirt.org/node/3560 as an example, everything works wonderfully with the map but can't seem to figure out how to allow users to click on the point and get the Google Maps pop-up that includes the how to get directions to or from this location. Any suggestions?
Comments
Comment #1
skjalf CreditAttribution: skjalf commented/subscribe
I'd also be interested to know how to have the user navigate to the google maps homepage with locative data already entered in to plan their own trip using the trip planner (outside of the site)
Comment #2
Bartezz CreditAttribution: Bartezz commentedsubscribing
Comment #3
someone_cooler CreditAttribution: someone_cooler commentedsubscribing
Comment #4
zdean CreditAttribution: zdean commentedsubscribing
Comment #5
Bartezz CreditAttribution: Bartezz commentedThis is a macro workaround I use;
Not the ideal, yet a working situation :)
Comment #6
scott4ravens CreditAttribution: scott4ravens commentedsubscribing
Comment #7
emagus CreditAttribution: emagus commentedsubscribing
Comment #8
biohabit CreditAttribution: biohabit commentedThank you scott4ravens for assigning this to yourself.
Comment #9
mizerydearia CreditAttribution: mizerydearia commentedCheck out http://googlemapsapi.blogspot.com/2007/05/driving-directions-support-add...
Comment #10
mizerydearia CreditAttribution: mizerydearia commentedhttp://tasteofthaiinc.com/drupal/directions
I didn't use the GMap module to implement the content on that page, however, it would be nice if I were able to use the module to create such content. I provided reference to it so that if it is helpful it could be used to aid in the development of this module to offer such capability.
Comment #11
scott4ravens CreditAttribution: scott4ravens commentedComment #12
tonycpsu CreditAttribution: tonycpsu commentedSubscribe
Comment #13
yrre7 CreditAttribution: yrre7 commentedsubscribe
Comment #14
melchior CreditAttribution: melchior commentedsubscribe
Comment #15
butler360 CreditAttribution: butler360 commentedThis is working well enough for me for now:
[gmap markers=alt small red::33.44060944370356,-117.61825561523437%autoclick:<form action="http://maps.google.com/maps" method="get" target="_blank"><b>Get Directions to SCBA</b><br /><span class="descriptor">Start address:</span><br /><input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="Street, City, State, Zip" class=descriptor onFocus="this.value=\'\';" /><br><INPUT value="Get Directions" TYPE="SUBMIT" class=descriptor><input type="hidden" name="daddr" value="33.44060944370356, -117.61825561523437"/></form> |align=Center |zoom=14 |center=33.44060944370356,-117.61825561523437 |width=555px |height=325px |control=Small |type=Map]
Combined a few things from a few threads.
Comment #16
Bartezz CreditAttribution: Bartezz commentedThanx for that!
Comment #17
baaj CreditAttribution: baaj commentedsubscribe
Comment #18
NWOM CreditAttribution: NWOM commentedI was looking to do the same thing, but I think I've come up with the best fix until the module actually supports it.
Keep in mind that I'm using Views to do this.
Basically, add a view like you normally would with all your desired fields etc.
Next, you want every type of address field there is, but exclude it from display, so that way views can use it, but for another field afterward. You can't use the address field since it's made up of divs, you instead have to add every address type field individually.
As an example, add the following:
Street,
City,
Province (also works for state),
Postal Code.
If you have any of the above already, you don't need to add it again, however the ones you don't have, add them and check exclude from display.
Next, make a new Node:Link field. Remove Label, Check "Rewrite the output of this display"..
Copy and paste:
<a href="http://maps.google.com/?q=to+[street]+[city]+[province]+[postal_code]" target="_blank">Driving Directions</a>
Done, now you have a dynamic driving directions link for every single node. Gotta love views :P
Comment #19
monotaga CreditAttribution: monotaga commentedNWOM, thanks for this tip; it works well.
It'd be nice to have this as an option in the module.
Comment #20
tyabut CreditAttribution: tyabut commentedI created a module to add driving directions to google maps. Maybe some of you will find it useful.
Comment #21
Bartezz CreditAttribution: Bartezz commented@NWOM #18
I'm using this:
<a href="http://maps.google.com/maps?saddr=&daddr=[street]+[postal_code]+[city]" target="_blank">Driving Directions</a>
This will call the directions interface directly...
Cheers
Comment #22
tonyyarusso CreditAttribution: tonyyarusso commentedsubscribe
Comment #23
TechnoBuddhist CreditAttribution: TechnoBuddhist commentedI use this in my module;
I found the directions using address alone weren't very accurate, so a bit of digging around in the google api, showed I could use the lat/lon and 'notate' them with the actual address. This gives accurate directions, but also gives the user the addresses that they want to see(lat/lon is uselss to them).
Don't forget to urlencode each element as you build up the link like this...
Hope it helps.
Comment #24
hutch CreditAttribution: hutch commentedYet another module supporting google driving directions: Get Directions
Hope this helps someone.
Comment #25
elally CreditAttribution: elally commented/subscribe
Comment #26
SweeneyTodd CreditAttribution: SweeneyTodd commentedSubscribing
As a temporary fix, #18 solution using Views was fantastic. I added this link in a couple of minutes with no custom code.
Comment #27
msathesh CreditAttribution: msathesh commented#18 solution worked for me .. thanks very much..
Comment #28
jeuelc CreditAttribution: jeuelc commented#18 solution also worked for me... thanks.
i'm on drupal 7 by the way
Comment #29
lyosef CreditAttribution: lyosef commentedbulter360, how nice for you. Would you mind sharing how you did that?
Comment #30
koppie CreditAttribution: koppie commented@lyosef, your tone came off as snarky. I'm sure that wasn't intentional.
This issue has been discussed elsewhere, so I'm going to close it as a duplicate. Please see #151005: Driving directions?. Per the maintainer, neither 5.x nor 6.x versions are supported any more.
Comment #31
rwilson0429 CreditAttribution: rwilson0429 commentedThis is an old issue but, for me, it is still relevant. It may be still relevant for others too. So, I've created a documentation page that shows how to do this using a custom content type, Views with an Eva display. The documentation was inspired by #18 and #21.
Hope it helps someone.
Comment #32
BleuBi CreditAttribution: BleuBi commentedWell i still think it should be in the gmap module as an option.