---
title: "Implementation of get direction in Drupal (Map route directions)"
description: "The Get Directions module provides the ability to get directions to and from places using Google Maps. Implementing get direction for a Drupal website will help you give a route map to your required area after user enters from and to addresses. Or you can make to address constant. In-order to…"
url: https://www.specbee.com/blogs/implementation-get-direction-drupal-map-route-directions
type: Article
author: "Bharath Kumar"
published: 2014-07-02
updated: 2026-07-31
---

# Implementation of get direction in Drupal \(Map route directions\)

The Get Directions module provides the ability to get directions to and from places using Google Maps.

Implementing get direction for a Drupal website will help you give a route map to your required area after user enters from and to addresses. Or you can make to address constant.

In-order to implement get-direction functionality following modules are required.

- Get direction
- GMap
- Geofield
- Geophp
- Chaos tools
- Address field

A.Download install and enable the above modules.

 ![image](https://www.specbee.com/sites/default/files/styles/large/public/migrated/get_20direction_2001_0.png.avif?itok=HRN_u6Xz)

 

 B. Now create a custom content type with address field with field type as geofield and widget type as latitude/longitude.

For ex: get\_direction\_type

 ![image](https://www.specbee.com/sites/default/files/styles/large/public/migrated/get_20direction_2002_0.png.avif?itok=IdVEHRSz)

 

 C. Create a content for the above content type and note the node id.

For ex: mysite\_get\_direction

D. Next step will be to create a custom block and paste the following code into block body.

&lt;?php

$n = arg(0);

if ($n == 'node') {

$nid = arg(1);

if (is\_numeric ($nid) && $nid > 0) {

echo getdirections\_entity\_setlocation($n, 'to', 134);

}

}

?>

In the above code, 134 is the node id of the content we created. In this ex: mysite\_get\_direction

Save the block and enable it to the pages you want to display.

E. Now navigate to admin menu - Configuration > web services > get direction.

 ![image](https://www.specbee.com/sites/default/files/styles/large/public/migrated/get_20direction_2003_0.png.avif?itok=MYuWScm1)

 

 Most of the settings are simple and self explainatory.

Some settings i would like to highlight is

**Other settings tab**

- You can enable to display total distance and duration of the travel.
- Make the to address constant- Enable from/To switch.
- Enable traffic information for more accurate results.

 ![image](https://www.specbee.com/sites/default/files/styles/large/public/migrated/get_20direction_2004_0.png.avif?itok=tvZzUehQ)

 

 Your final result will look similar to below image.

Getdirections also supports the following locative modules:

- Getlocations\_fields
- Location
- Geofield
- Geolocation

You should only install one of the above.