New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet.layerscontrol-minimap

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet.layerscontrol-minimap

Leaflet layers control with minimaps

  • 1.0.21
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
165
increased by25.95%
Maintainers
1
Weekly downloads
 
Created
Source

Leaflet Layers control with minimaps

Displays minimaps in a layers control.

  • Only updates layers currently visible in the control.
  • Uses Leaflet.Sync and leaflet-clonelayer
  • Tested with Leaflet 1.7.1
  • Available on npm: npm install leaflet.layerscontrol-minimap

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

Keywords

FAQs

Package last updated on 26 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc