1.0.21 • Published 3 years ago

leaflet.layerscontrol-minimap v1.0.21

Weekly downloads
41
License
BSD-2-Clause
Repository
github
Last release
3 years ago

Leaflet Layers control with minimaps

Displays minimaps in a layers control.

Usage

Exactly like Leaflets default layers control, with some extra options. Add the scripts + css to your html:

<link rel="stylesheet" href="control.layers.minimap.css" />
<script src="L.Control.Layers.Minimap.js"></script>

and add the control to your map:

L.control.layers.minimap(basemaps, overlays, options).addTo(map);

Extra options

In addition to the options available for L.Control.Layers:

  • topPadding: number of pixels padding to the top of the map. Defaults to 10.
  • bottomPadding: number of pixels padding at the bottom of the map. Defaults to 40.
  • overlayBackgroundLayer a (tile)layer which is added to the minimap of each overlay as a background. If set to false, no background layer wil be used for overlays. Defaults to Hydda Base

Extra methods

One extra method is added:

  • filter(string): if called with a non-empty string is passed, only layers with a name containing that substring are shown, while the others are set to display: none. The method will return a map with the layers currently visible.

Live example

http://jieter.github.io/Leaflet.layerscontrol-minimap/

Screenshot

1.0.21

3 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

8 years ago

1.0.6

8 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago