Building A Travel Map - Drupal Way (Gmap + Views + Selective Filters)

| Drupal Development | 5 seen

In this article, I'll show how I built a travel map using Drupal and a few extra modules.

For a starter, you can see a live preview by visiting my Travel Map.

In this map, I have listed all places I have visited since October 2013 (When I started my blog). I have used a few filters to allow limiting results on the map, for example,  users can filter by Country, Region, and Theme (Category).

To make it work better and more intuitive I have used a small but neat Drupal module - Views Selective Filters

Drupal travel map

Drupal travel map

Location and Gmap module

First things first, you will need to download and enable the Location and Gmap modules. With help of these modules, we will actually enter and store Geospatial data on our Drupal site.

Adding Location to Content Type

The next thing you should do is configure a location field for your content type (s)

Building a views page

Now that you have configured a location and map modules, as well you have added a few nodes with location details you can start creating your views page. 

Create a new view with a page, and give it a path, for example /map. Change display settings from Unformatted list to Gmap

Drupal Views Gmap display

Drupal Views Gmap display

Add fields you wish to be displayed on the map page.

Views selective filters

This is a little and neat module that will help you add selective type filters on your view, for example, country, region, or category

Basically, that's it to get you to start building your own travel map on your Drupal blog or website.

If you need any help building a travel map with Drupla or Drupal in general, consider hiring me!