l-advanced-control
Leaflet controls with advanced positioning capabilities.
Requirements
Leaflet 1.3.x.
Demo
Usage
- Include this plugin after Leaflet.js
or install and use with npm:
npm i l-advanced-control --save
import 'l-advanced-control'
- Extend
L.AdvancedControl
class, to define your control.
const MyButton = LAdvancedControl
- Add it to map
const button = position: corner: 'topleft' grow: 'x' button
API
L.AdvancedControl
adds to L.Control
prop grow
, which defined direction, in which it will "grow".
type Grow = 'x' | 'y'
Licence
MIT