Simple navigation toolbar for Leaflet.
npm install leaflet-nav --save
The default state for the control is just below the zoom control. This will allow map users to navigate forward and back in the map's view history as well as navigate to a home view.
L.control.navbar().addTo(map);
Options for initialising the Leaflet.Nav control.
Option | Type | Default | Description |
---|---|---|---|
position | String | 'topleft' |
The initial position of the control. |
center | L.LatLng |
Map's Current Position | The center point for the home view. |
zoom | Number | 0 |
The zoom value for the home view. |