Site Building

Displaying a Location on a Map with Leaflet for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Sprout Video

Now that we've stored the latitude and longitude for a node, we can display it on a map. In this lesson, we'll take a look at the documentation for Leaflet and we'll download and install the Leaflet JavaScript library and the Leaflet Drupal module, which loads the Leaflet JavaScript library and provides configuration options that we'll use later on.

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

  • Install Leaflet and its dependencies to your Drupal site
  • Configure a Geofield field to display as a Leaflet map

Additional resources

Leaflet module

Download LeafletJS

Leaflet module documentation