Leaflet uses Geofield to store a variety of geographical data and formats. So, before we can start mapping, we need to have a way to capture location data in Drupal. Amber will walk you through how to install and configure Geofield for a new content type. Then we'll add Leaflet to the mix and display a latitude/longitude point on an OpenStreetMap.
Next, we'll explore another option for location data storage: geocoded postal addresses. Amber will show you how to configure a Feeds Importer for importing addresses into AddressField and configure Geofield to automatically geocode postal addresses for display on a map.
Finally, you'll learn how to use Views and Leaflet display a map of multiple locations. Then, we'll look at various ways to customize Leaflet and override its default settings.
After completing this series, you should be able to (on a Drupal 7 site):
- Use Geofield to store geospatial data
- Use Leaflet to display single and multiple locations on a map
- Configure Drupal to Geocode postal addresses upon data entry or import
- Use Views to create maps with Leaflet
- Implement various features of the Leaflet library such as customizing map marker icons, swapping out base map layers, enabling marker clustering, and overriding other default settings.
This series provides a solid introduction to Leaflet and Geofield, one of several mapping solutions available in Drupal (see Comparison of mapping modules on drupal.org.) Leaflet's features are extended by a number of different contributed modules. With the growing relevance of location data in web sites and applications, Leaflet is an up-and-coming solution worth adding to your Drupal site building tool kit.