Extensions for Leaflet Map


Plugin to extend the WordPress Plugin Leaflet Map.

WordPress Plugin

You need to install the plugin Leaflet Map.

Used Leaflet Plugins and Elements

Other functions

  • hover: Use it to highlight a geojson element or get a tooltip on mouse over.
  • Hide Markers: Use it when a track in a GPX file contains some markers and you don’t want to display them on the map.

Capturi ecran

  • Track with elevation profile and Switching Tile Layers
  • Multiple Tracks with elevation profile
  • Hover a Geojson area
  • Markercluster and Groups
  • GestureHandling


You can install the plugin through the WordPress installer under Plugins. Add this by searching for „extensions-leaflet-map”.
Please see https://wordpress.org/support/article/managing-plugins/#installing-plugins.

Go to Settings – Leaflet Map – Extensions for Leaflet Map and get some documentation and settings options.

Întrebări frecvente

Display a track with elevation profile

[leaflet-map ....]
// at least one marker if you use it with zoomehomemap
[leaflet-marker lat=... lng=... ...]Start[/leaflet-marker]
[elevation gpx="url_gpx_file" option1=value1 option2 !option3 ...]

For options see the Elevation Charts Options tab in the admin settings or here.

It is possible to display multiple tracks with their elevation profiles also, see help.

Switching Tile Layers

First go to Settings -> Leaflet Map -> Leaflet Map Extensions and configure tile layers.

[leaflet-map mapid="..." ...]


Many markers on a map become confusing. That is why they are clustered.

You can define some parameters in Settings -> Leaflet Map -> Leaflet Map Extensions or per map.

[leaflet-map ....]
// many markers
[leaflet-marker lat=... lng=... ...]poi1[/leaflet-marker]
[leaflet-marker lat=... lng=... ...]poi2[/leaflet-marker]
[leaflet-marker lat=... lng=... ...]poixx[/leaflet-marker]
// or
[cluster radius="..." zoom="..." spiderfy=0]


dynamically add/remove groups of markers from Marker Cluster.

  • feat – possible values: iconUrl, title
  • strings – comma separated strings to distinguish the markers, e.g. an unique string in iconUrl or title
  • groups – comma separated labels appear in the selection menu
  • The number of strings and groups must match.
[leaflet-marker iconUrl="...red..." ... ] ... [/leaflet-marker]
[leaflet-marker iconUrl="...green..." ... ] ... [/leaflet-marker]
//many markers
[markerClusterGroup feat="iconUrl" strings="red,green" groups="rot,gruen"]


[leaflet-marker title="first ..."  ... ] ... [/leaflet-marker]
[leaflet-marker title="second ..." ... ] ... [/leaflet-marker]
//many markers
[markerClusterGroup feat="title" strings="first,second" groups="First Group,Second Group"]


"Home" button to reset the view. A must have for clustering markers.

There are several usage possibilities, see the help in Settings -> Leaflet Map -> Leaflet Map Extensions.

[leaflet-map lat=... lng=... zoom=... !fitbounds]
[leaflet-marker ....]
[zoomhomemap !fit]


[leaflet-map ....]




Use it to highlight a geojson element or get a tooltip on mouse over.

[leaflet-map ...]
[leaflet-geojson src="//url/to/file.geojson" color="..."]{name}[/leaflet-geojson]
//or / and
[leaflet-gpx src="//url/to/file.gpx" color="..."]{name}[/leaflet-gpx]
//or / and
[leaflet-kml src="//url/to/file.kml" color="..."]{name}[/leaflet-kml]
//or / and
[leaflet-marker ... ]...[/leaflet-marker]


Brings the basic functionality of Gesture Handling into Leaflet Map.
Prevents users from getting trapped on the map when scrolling a long page.
You can enable it for all maps or for particular maps. It becomes active
only when dragging or scrollWheelZoom is enabled.
You can define the options in Settings -> Leaflet Map -> Leaflet Map Extensions.

Hide Markers

If a GPX track contains waypoints that you do not want to display.

[leaflet-map ...]
[leaflet-gpx src="//url/to/file.gpx" ... ]


Detailed documentation in german.


4 iunie 2021
Wow, I was searching and puzzling a long time how to integrate choosing different tile layers control in leaflet-map plugin, but had to accept my javascript skills were very insufficient 🤭. Thank you so much for figuring this out and sharing this as an extension plugin 👍 In my enthousiasm I left this as a comment at a leaflet-map support topic, but I guess it belongs here.
Citește toate cele 2 recenzii

Contributori și dezvoltatori

„Extensions for Leaflet Map” este un software open-source. La acest modul au contribuit următoarele persoane.


„Extensions for Leaflet Map” a fost tradus în 1 locală. Mulțumim traducătorilor pentru contribuția lor.

Tradu „Extensions for Leaflet Map” în limba ta.

Te interesează dezvoltarea?

Răsfoiește codul, vezi depozitarul SVN, sau abonează-te la jurnalul de dezvoltare prin RSS.

Istoric modificări


  • Works with Elementor now


  • Tested on WordPress 5.8
  • enhancement of elevation and introduction of many parameters
  • leaflet-gesture-handling 1.3.5
  • leaflet-elevation-1.6.9
  • bug fix hover


  • leaflet-elevation 1.6.8
  • https://github.com/Raruto/leaflet-gesture-handling (is newer)
  • fixed some mistakes in gestures and others
  • deal with safari bug on markers popup
  • hovering on all geojsons and markers
  • multielevation (gpx-groups)


  • zoomhomemap works on multiple maps on a page now.
  • fixing markercluster and markerClusterGroup for this.


  • Shortcodes can be used on more than one map per page, except zoomhomemap.
  • Parameter for GestureHandling
  • fixed markerClusterGroup
  • prepare for translation
  • documentation


  • documentation on a help page
  • prepare for translation
  • new setting options for [markercluster]
  • new setting options for [zoomhomemap]


New functions:
* markerClusterGroup
* Switching Tile Layers


  • leaflet-elevation v1.6.7


  • First Release