Site Building

Storing Geographic Data with Geofield for Drupal 7

Check your version

This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Sprout Video

Before we can display a location on a map, we need to decide on a location storage method. This is a critical step because not all storage methods are compatible with every mapping module. Since we'll be using Leaflet, we'll need to use Geofield to store our geographic data. Geofield will provide us with a new type of field that we can add to any entity bundle or content type. Geofield provides many different field formatters that can display geographic data in a variety of formats, such as latitude and longitude or well known text.

By the end of this lesson, you should be able to:

  • Download and install Geofield and its dependencies GeoPHP and CTools
  • Create a field on a content type using Geofield
  • Enter a latitude and longitude for a location node

Join Amber Matz as she walks you through how to prep your site to store location data using Geofield module.

Additional resources

Geofield module


Installing and Enabling Modules in Drupal 7

Comparison of mapping modules