1.0.0 • Published 7 years ago

leaflet.customsidebar v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Leaflet.CustomSidebar

A customizable Sidebar component for Leaflet library.

Installation

npm install leaflet.customsidebar

Usage

Include the CSS:

<link rel="stylesheet" href="Leaflet.CustomSidebar.css">

Include the JavaScript:

<script type="text/javascript" src="Leaflet.CustomSidebar.js"></script>

Example usage:

L.control.customSidebar('<p>The Sidebar content</p>', {
    position: 'topright',
    width: '320px'
}).addTo(map);

Options

position: The standard Leaflet.Control position parameter. Defaults to 'topleft'
width: Set the width of the slide menu. Defaults to '300px'
classname: Parent class of the sidebar container, defaults to '320px'