Our Drupal students frequently want to add a map to their content. In this tutorial we're going to show you how.
We'll take the example of a Yellow Pages-style directory and show you how to display a Google Map beside each business listing.
Install and enable these two modules:
If you don't have it, you will also need CTools:
Create a Content Type Using Address FIeld
The first step is create content using the Address Field module.
Click Add content and add a company to your site. We used Phase2 as an example, because they actually built these address modules:
Configure the Address FIeld Static Map Block
Place the Block
No matter which pages you try to place this block on to, it will only appear under two conditions:
Here's how Phase 2 appears:
All of our tutorials are published under the Creative Commons Attribution-NonCommercial license. This means: