0.4.4 • Published 4 years ago

leaflet.markercluster.list v0.4.4

Weekly downloads
7
License
ISC
Repository
-
Last release
4 years ago

Leaflet.MarkerCluster.List

subplugin for the Leaflet.MarkerCluster to display clustered child elements in the list

sample image

Options

  • labelFn (fn (element, element index, cluster) ) - function to handle how to display each element in the list

    (el, ei, cluster) => {
      return '<p onclick="clickAction(' + el.options.id + ')">[' + ei + '] ' + el.options.listText + '</p>';
    }
  • headerFn (fn (elements, cluster) ) - function to handle header

    (els, cluster) => '<p>showing cluster with ' + els.length + ' elements</p>'
  • sortFn (fn (marker1, marker2) ) - implementation of markers sorting in list (see e.g. mozilla docs )

    (m1, m2) => m1.options.id > m2.options.id ? 1 : -1
  • showHeader (bool, default false) - whether to display header

  • sidePanel (bool, default false) - whether to show side panel with close button
  • sidePanelWidth (number, default 50) - width of side panel in px
  • centerOnChange (bool, default false) - whether to pan map to active cluster after spiderfied event
  • list (bool, default true) - whether to apply this list rule or not

Notes:

  • suitable for mobile devices where the display is too small to spiderfy clustered child elements on the map

Author:

  • Adam Mertel | UNIVIE

Demo:

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago