Installing and configuring the leaflet map module in your drupal website

In this tutorial, we will be installing and configuring the leaflet maps module in our drupal website. This is our fourth series on working with maps in drupal. The leaflet map is an open-ssource javascriipt library. It can be used for building mobile friendly interactive maps. What makes the leaflet map stand out is its simplicity, performance and usability. It takes advantage of HTML5 and CSS3 on modern browsers. It however still works beautifully well on old browsers. For this tutorial we used geocoder module to automatically geocode Addressfield addresses into Geofield points for display on the leaflet maps.

Link to leaflets Library to be extracted in your sites/all/libraries/leaflet folder

Leaflet library



Great demo of how easy it is to create a snazzy, mobile-optimised map in under 8 minutes!

The introduction of the AddressField/Geocoder pair of modules explained in this video is a nifty addition, showing that while all maps are based on latitude/longitude information, you do not have to enter these or even see them: only the postal addresses are required, if you have these modules enabled.

While the scope of a well-size tutorial doesn't allow to show much more, Leaflet's potential does not end here. The tiny module "Leaflet More Maps" for instance instantly adds over 20 beautiful maps to that drop-down that has only one option (OSM Mapnik) out of the box. And "Leaflet More Maps" requires NO configuration whatsoever.

Other instant wins are "Leaflet MarkerCluster" for beautiful animated zoom/cluster/spiderfy functionality and "IP Geolocation Views and Maps", which adds centering options, superimposed visitor marker, marker tags & tooltips, alternative markers colours shown based on taxonomy, type or in fact any field appearing in your View.

Something for a follow up, perhaps?

Hi RdeBoer,

Thanks for the compliment. Currently working on the other tutorials you have suggested. Should be out by tomorrow hopefully :-)

Hello Guys, great tutorials! I have a question regarding leaflet. how can I change the default zoom here?

I have the same question - how to set zoom and width of the map.

Great tutorial -but i have hit a snag. i dont seemt o have the 'geoleaflet' in my list of fields (6:00 mark of video)

Nice tutorial but why skip the bit about creating maps?? 4.30 - "now we have created all the leaflets..." - really??

Most people are not going to enter their Longitude and Latitude into a geofield. Geolocation Module uses HTML 5 auto

You have a weird Drupal Captcha error. "CAPTCHA session reuse attack detected."

You never showed adding the content in this screen cast?

Hello. And Bye.

Tramadol Dea Kentucky What Class Tramadol Apap Taking Paracetamol Buy Tramadol <a href=

I watched the video and use website to write the same description for

Add new comment