Here is my simple patch to add a "Directions" button to the popup window on a geofield map display. I added a new option called "Show a Directions link" in the widget options, and it adds a link that opens to google maps in a new window.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mariacha1’s picture

Here's a screenshot of the link, as well.

klucid’s picture

Works great. Thanks for the patch!

vlyalko’s picture

I cannot seem to be able to find where to set this Show a Directions parameter. Can you please assist? Thank you

vlyalko’s picture

I have found where I can set the show direction property, but even if it is checked, the link is still not showing up. Can you please help? Thank you

cosmo.kramer’s picture

How do I install it?

eudaemonia’s picture

You can follow directions here to use cygwin to apply the patch. Once you've uploaded the patched files to your server, be sure you update.php.

Create a content type, use addressfield to collect location data, and use geofield to "geocode from another field" (that's the widget you should choose when you add a geofield to your content type).

In "Manage Display," for geofield, choose geofield map. When you click settings for the display (the little gear to the right) you'll see a "Show a Directions Link" check box at the bottom of the list. Check it. Be sure to hit "Save" on the "Manage Display" link and you're done.

RKopacz’s picture

Issue summary: View changes

I'm looking for something like this, but note that this issue is over a year and a half old. I am using the current release of Geofield. Will the patch work on that now? Will have a look at it myself but if someone knows would appreciate an update.

thanks

troybthompson’s picture

I have other patches so I installed this manually, but it worked great. Thank you! A badly needed feature.

harrrrrrr’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.35 KB

Tested & works.
Patch against current version attached.

ntsekov’s picture

Updated text link to View on Google Maps and added class map-direction to link if you want to add some style for it.