Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Leaflet Map

A flexible plugin that adds basic shortcodes for creating multiple Leaflet maps and adding multiple markers to those maps.

Add a map generated with Leaflet JS: a mobile friendly map application. Map tiles are provided by default through OpenStreetMap and MapQuest (with an app key). Can be set per map with shortcode attributes or through the dashboard settings.

Some shortcode attributes:

Height, width, latitude, longitude and zoom are the basic attributes:

[leaflet-map height=250 width=250 lat=44.67 lng=-63.61 zoom=5]

However, you can also just give it an address, and Google will look it up for you:

[leaflet-map address="Oslo, Norway"]

The default URL requires attribution by its terms of use. If you want to change the URL, you may remove the attribution. Also, you can set this per map in the shortcode (1 for enabled and 0 for disabled):

[leaflet-map show_attr="1"]

The zoom buttons can be large and annoying. Enabled or disable per map in shortcode:

[leaflet-map zoomcontrol="0"]

Add a marker to any map by adding [leaflet-marker] after any [leaflet-map] shortcode. You can adjust the lat/lng in the same way, as well as some other basic functionality (popup message, draggable, visible on load). Also, if you want to add a link to a marker popup, use [leaflet-marker]Message here: click here[/leaflet-marker] and add a link like you normally would with the WordPress editor.

Add a line to the map by adding [leaflet-line]. You can specify the postions with a list separated by semi-colon ; or bar | using lat/lng: [leaflet-line latlngs="41, 29; 44, 18"] or addresses: [leaflet-line addresses="Istanbul; Sarajevo"], or x/y coordinates for image maps.

Or you can add a geojson shape via a url (work in progress): [leaflet-geojson src="https://example.com/path/to.geojson"]

Alternatively, you could use a plain image for visitors to zoom and pan around with [leaflet-image source="path/to/image/file.jpg"]. See screenshots 3 - 5 for help setting that up.

Check out the source code on GitHub!

Requires: 3.0.1 or higher
Compatible up to: 4.7.2
Last Updated: 3 days ago
Active Installs: 1,000+


5 out of 5 stars


3 of 4 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

2 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,2,2
100,1,1 100,1,1 100,1,1 100,1,1 100,2,2
100,1,1 100,1,1
50,2,1 100,1,1 50,2,1
100,1,1 100,1,1
100,1,1 100,1,1
100,2,2 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,2,2