Trip map and directions

Events happening in the community are now at Drupal community events on www.drupal.org.
henno.gous's picture

Hey guys,

I'm trying to setup a functionality where I allow users to post a trip that they will be taking. So I have created a node type for a "trip" and created a location field for the start and another for the destination. Geocoding of these two location fields are working just fine.

Now comes the part that I'm not quite sure how to approach:

When the saved node is displayed, I want the start and end locations to be displayed, and underneath the field values I want a Google Map with the route marked and the directions next to that. Pretty much like this: http://code.google.com/apis/maps/documentation/examples/directions-advan...

(Obviously I won't be using a form to capture the locations as in that example, as I have already done that when the node was created.)

I have been playing around with adding the necessary scripts to the of my theme, and then including the actual map and directions as part of a block that I display below the node. But as I'm not really a programmer and I'm now struggling to get the javascript to read the two fields values in my node, I was hoping that there is maybe a simpler approach to tackling this problem? Maybe a module that I just don't know about? I've looked around quite a bit and read as much as possible on Google directions in Drupal, so I doubt whether this is the case.

So, if you guys feel that I'm on the right track, could anybody be so kind to put their hand up and help me connect my javascript to those two field values?

Kind regards,
Henno

Comments

chill8331's picture

As far as i know there's no moudle to do such specific things like this. You already find the example page. Make an extension module it will work.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: